model-writtenrun 9564 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Nov 2018 - Apr 2019 ยท 21 entries
- Alvaro Herrera proposed foreign keys referencing partitioned tables in #1, using one constraint row per partition on each side and triggers on leaf partitions, while leaving referenced-partition removal checks unfinished.
- Corey Huinker suggested statement-level referential-integrity checks in #3, but Alvaro explicitly kept that optimization outside this patch's scope in #4.
- Alvaro expanded the work into five patches in #6, separating constraint decoding and cloning cleanup, introducing DROP/DETACH checks, and adding index lookup and clearer psql constraint displays.
- Jesper Pedersen tested the series and requested additional coverage, documentation, and relocation of index_get_partition in #7 and #8; Alvaro's #10 reported two prerequisites already committed, extracted the helper, and deferred psql display work to a separate effort.
- The February update #12 incorporated dependency and cloning changes plus default-partition and detached-constraint fixes, followed by the tuple-slot rebase in #14.
- Amit Langote questioned duplicate constraints and asymmetric recursion in #13, but Alvaro explained in #16 and #21 that a foreign key explicitly referencing one partition must retain its narrower meaning rather than silently become a reference to the whole parent.
- Robert Haas proposed exploiting compatible partition layouts in #17, while Alvaro deferred that optimization in #18 and reported that ordinary RI queries already benefited from partition pruning in #28.
- Jesper's pg_upgrade failure report in #15 led Alvaro to post the diagnostic dump difference in #22, initially appearing to be only reordered primary-key declarations.
- Alvaro reorganized recursion and validation scheduling in #23, but demonstrated that pre-drop checks incorrectly rejected cascading drops even when the foreign key itself was being removed.
- Amit supplied a callback-suppression fix in #24, but Alvaro rejected it because dropping a schema containing only a partition could bypass necessary checks in #25, then explored suppression lists before favoring DETACH checks in #29.
- On March 20, 815b20ae0c restored RI sanity checking discussed in #10 without a matching attachment, and a6da004715 committed the index_get_partition component of #23.
- Alvaro traced the dump-order failure to a clobbered constraint address in #31, posted the standalone repair in #32, and committed it with upgrade-test fixtures as 7e7c57bbb2; #33 then resent the remaining feature work.
- Jesper investigated high planning overhead in #30 and #36, but after Amit questioned its connection to the patch, Jesper confirmed in #39 that the performance issue also occurred without the new feature.
- Amit found invalid referenced-index identifiers and duplicate cloned constraints, supplying two fixes in #38; Alvaro incorporated both with regression coverage in #40.
- Testing those fixes exposed a separate dropped-column indexing bug bundled in #40, which became 126d631222 after omitting a proposed bounds-check alteration and adding upgrade-test fixtures; #41 resent the remaining series.
- After Amit identified redundant psql constraint output in #43, Alvaro fixed that display and replaced pre-drop hooks with INTERNAL dependencies in #44, allowing DROP CASCADE to remove the foreign key while reserving row-sensitive validation for DETACH.
- Robert and Jesper questioned the resulting DROP behavior in #46 and #48, and Alvaro clarified in #49 that dropping a referenced partition with CASCADE intentionally removes the dependent foreign key.
- Jesper reported successful feature tests in #53, but Alvaro subsequently found missing protection against concurrent referenced-row deletion and an older-server psql regression, fixing both and simplifying cloning in #54.
- Amit and Jesper tested the final submission successfully in #55 and #56, while Amit identified generic-plan scalability as future work rather than a blocker.
- Tom Lane explained in #57 why row-dependent DROP checks do not fit the existing object-dependency model, accepted a separate DETACH step as a practical solution, and requested clearer documentation and test comments.
- Alvaro committed #54 as f56f8f8da6 with naming cleanup and expanded tests, announcing completion in #59; the thread ended with acknowledgments in #60 and #61, leaving DROP-hook improvements and performance optimizations for future work.