model-writtenrun 3539 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Amul Sul reported that dump/restore lost the NOT NULL marking on deferrable primary-key columns in #1; Alvaro Herrera traced this to dropping pg_dump's throwaway NOT NULL constraint while relcache ignored deferrable primary keys in #2.
- Amul proposed suppressing throwaway NOT NULL constraints for deferrable primary keys in #3 and added test coverage in #5 following Vignesh C's request in #4; Aleksander Alekseev confirmed the patch fixed the reported bug and passed tests in #6.
- Dean Rasheed rejected that approach in #7 because throwaway NOT NULL constraints avoid a table scan during restore, arguing that the backend should preserve non-nullability when any primary key supports it.
- Alvaro supplied a backend workaround that explicitly scanned for deferrable primary-key columns in #8, but Dean demonstrated in #9 that CREATE TABLE LIKE also lost non-nullability and argued for fixing the shared primary-key bitmap instead.
- Alvaro demonstrated in #11 that allowing deferrable primary keys to identify replicated rows could corrupt replicated data; Dean proposed separating primary-key discovery from replica identity in #12, and Alvaro identified the additional primary-key fallback that required a deferrability flag in #13.
- Alvaro's replacement patch in #14 admitted deferrable primary keys into relcache while excluding them from replica identity; Amul confirmed it worked in #15, and Dean tested CREATE TABLE LIKE and requested additional regression tests and naming/layout refinements in #16.
- Alvaro committed #14 as 270af6f0df, preserving its logic while refining names and comments and adding inheritance and throwaway-constraint regression tests.
- After Robert Haas asked whether the broader NOT NULL revert made the CommitFest entry obsolete in #17, Alvaro clarified in #18 that this fix had already landed and survived that revert, although its usefulness depended on future NOT NULL design choices.
- Alvaro marked the CommitFest entry committed in #20, and Robert acknowledged closure in #21; no replacement patch remained under review.