Merge ~cjwatson/launchpad:db-artifactory-publishing-columns-not-null into launchpad:db-devel

Proposed by Colin Watson
Status: Needs review
Proposed branch: ~cjwatson/launchpad:db-artifactory-publishing-columns-not-null
Merge into: launchpad:db-devel
Diff against target: 22 lines (+16/-0)
1 file modified
database/schema/patch-2211-08-0.sql (+16/-0)
Reviewer Review Type Date Requested Status
William Grant db Needs Information
Review via email: mp+436604@code.qastaging.launchpad.net

Commit message

Make Artifactory publishing columns non-nullable

Description of the change

The backfill jobs have all finished everywhere now.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

Neither SPPH.format nor BPPH.binarypackageformat are indexed, so this will likely heavily lock the tables for Some Time.

I also forget if `ALTER COLUMN ... SET NOT NULL` will use an index at all.
We have catalog hacked for this sort of thing in the past, but ideally we'd avoid it again.

review: Needs Information (db)
Revision history for this message
Colin Watson (cjwatson) wrote :

It is apparently impossible to avoid the long lock and sequential scan in PostgreSQL < 12 without catalog hacking, although as of 12 it can be done using check constraints (not indexes):

  https://www.postgresql.org/message-id/1034971590734717%40mail.yandex.ru

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: