Re: pg_subscription.subslotname is wrongly marked NOT NULL
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2020-07-21T16:42:42Z
Lists: pgsql-hackers
I wrote: > * On the other side of the ledger, if we don't fix these markings > we cannot back-patch the additional assertions I proposed at [1]. > I'm kind of leaning to committing this as shown and back-patching > the patch at [1], but certainly a case could be made in the other > direction. Thoughts? After further thought about that I realized that the assertion patch could be kluged in the same way as we did in llvmjit_deform.c, and that that would really be the only safe way to do it pre-v13. Otherwise the assertions would trip in pre-existing databases, which would not be nice. So what I've done is to back-patch the assertions that way, and *not* apply BKI_FORCE_NULL in the back branches. The possible downsides of doing that seem to outweigh the upside of making the catalog state cleaner in new installations. regards, tom lane
Commits
-
Assert that we don't insert nulls into attnotnull catalog columns.
- fb71329ad6fc 10.14 landed
- f451029db85a 11.9 landed
- bca409e5b160 13.0 landed
- 43ef3c4c360a 12.4 landed
- 3e66019f1554 14.0 landed
-
Avoid direct C access to possibly-null pg_subscription_rel.srsublsn.
- ae3d40b0cdc6 10.14 landed
- 99b0c5da3e10 11.9 landed
- b7103bbe34aa 12.4 landed
-
Kluge slot_compile_deform() to ignore incorrect attnotnull markings.
- 855195a7ba98 11.9 landed
- 798b4faefd20 12.4 landed
-
Correctly mark pg_subscription_rel.srsublsn as nullable.
- e5372b48b94f 13.0 landed
- 0fa0b487b5d7 14.0 landed
-
Correctly mark pg_subscription.subslotname as nullable.
- 914d2383ae91 13.0 landed
- 72eab84a565c 14.0 landed