Nov 2022

1 commit
Create FKs properly when attaching table as partition
3 Nov 2022Alvaro Herreramaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1REL_15_STABLE15.1REL_14_STABLE14.6REL_13_STABLE13.9+1 more
LLM analysis, 100% surewritten from the discussion, no matching patch

Alvaro identified missing Constraint-node initialization in #23 and announced the fix in #26, without attaching it. The commit sets initially_valid in CloneFkReferencing(), standardizes initialization at three sites in src/backend/commands/tablecmds.c, and corrects two regression-output rows.

Oct 2022

1 commit
Fix self-referencing foreign keys with partitioned tables
7 Oct 2022Alvaro Herreramaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1REL_15_STABLE15.0REL_14_STABLE14.6REL_13_STABLE13.9+1 more
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #221 of 3 reviewers saw the final version

The commit combines all three patches from #22, retaining the constraint-type whitelist and duplicate-cloning fix. It additionally excludes constraints originating in the partition-to-be, rewrites comments, and moves and expands tests into foreign_key.sql, including repeated detach/attach and nested partitions, as explained in #25.

  • Tom Lanesaw an earlier versionLLM analysis, 99% sureIn #9, Tom endorsed positive constraint-type filtering and suggested considering exclusion constraints, which the later series adopted before further cloning changes.
  • Zhihong Yusaw an earlier versionLLM analysis, 98% sureZhihong questioned multiple-constraint handling in #7 and supplied the wording correction in #21 that was applied in #22, before the committer's additional logic changes.
  • Alvaro Herrerasaw the final versioncommittercommitted the patch

Sep 2022

2 commits
Fix GetForeignKey*Triggers for self-referential FKs
9 Sep 2022Alvaro Herreramaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1REL_15_STABLE15rc1Also in: pgsql: Choose FK name correctly during partition attachment
LLM analysis, 100% suremodified before commitlight changesfrom patchset #183 of 3 reviewers saw the final version

All four functional hunks match #18: filter action/check triggers by RI_FKey_trigger_type() and retain early exit only in non-assert builds. The sole content edit removes a period from one comment in src/backend/commands/tablecmds.c; #19 confirms the push.

  • Andres Freundsaw the final versionLLM analysis, 85% sureAndres reported intermittent FreeBSD and Windows assertion failures in #16, initiating the diagnosis that produced #18; his testing preceded the attached trigger fix.
  • Tom Lanesaw the final versionLLM analysis, 97% sureTom made the failure reproducible, identified inadequate self-FK trigger filtering, and proposed disabling early exit in assertion builds in #17, which #18 adopted.
  • Alvaro Herrerasaw the final versioncommittercommitted the patch
Choose FK name correctly during partition attachment
8 Sep 2022Alvaro Herreramaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1REL_15_STABLE15rc1REL_14_STABLE14.6REL_13_STABLE13.9+1 more
LLM analysis, 100% suremodified before commitlight changesfrom patchset #121 of 1 reviewer saw the final version

The src/backend/commands/tablecmds.c change matches #12 exactly. Alvaro added a regression case in constraints.sql and constraints.out and confirmed that addition and the backpatch to version 12 in #14.

  • Alvaro Herrerasaw the final versioncommittercommitted the patch

Credits across 4 commits

Author
Jehan-Guillaume de Rorthais2
Amit Langote1
Reviewer
Alvaro Herreracommitter3
Committer
Alvaro Herrera4