model-writtenrun 8266 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported that pg_subscription.subslotname was marked NOT NULL despite storing NULL for slot_name = NONE, causing failures when JIT compiled tuple deformation, and initially considered using an empty string instead #1.
- Tom rejected changing the representation because pg_dump and other clients could depend on NULL, choosing corrected catalog markings for HEAD and v13 plus a JIT workaround for older releases #2; the catalog correction landed without an attached patch as 72eab84a56.
- Tom posted the v12 JIT workaround and a regression test exercising subscription display after setting slot_name = NONE #3.
- Tom added assertions to catalog insertion and update functions to check manually constructed tuples, immediately exposing the same incorrect NOT NULL marking on pg_subscription_rel.srsublsn #4.
- Further inspection found two unsafe direct reads of srsublsn, so Tom posted null-aware reads, documentation, and a declaration hiding the nullable field from direct C access #5; these landed with an added catalog-version bump as 0fa0b487b5.
- The JIT workaround from #3 landed for v11 and v12 as 855195a7ba, expanded to handle both incorrectly marked columns and the alignment checks.
- Tom combined the subscription fixes into a v12 backpatch proposal, weighing whether corrected catalog annotations would disrupt external tools or make fresh test databases differ from existing installations #6.
- The backpatch proposal #6 landed as b7103bbe34 with the unsafe reads and documentation fixed but both BKI_FORCE_NULL annotations omitted; the assertions from #4 landed with a documentation cleanup as 3e66019f15.
- Tom closed the thread by explaining that pre-v13 assertion backports explicitly exempted the two incorrectly marked columns, avoiding failures in existing databases, and that the older branches would retain their catalog markings #7; all proposed fixes were resolved with that deliberate exclusion.