model-writtenrun 71 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- shihao zhong reported three child-only CHECK enforcement bugs in #1: enforcing a parent could produce incorrect query results by leaving a child unvalidated, changing a parent's column type could discard child enforcement, and dump/restore could lose that enforcement; the initial three-patch series followed in #3.
- jian he explained in #4 that implicitly validating a child would make ALTER CONSTRAINT behave differently when invoked through a parent, while Chao Li reproduced the bug and reviewed the initial fix in #5, reserving the broader enforceability-versus-validation design question for a separate discussion.
- jian he proposed dumping child constraint definitions directly in #6, but shihao initially rejected changing their local status because it changes whether a parent's DROP CONSTRAINT removes the child's copy; #7 instead retained ALTER CONSTRAINT output, incorporated jian's partition case, and changed parent enforcement to reject an unvalidated child until explicitly validated.
- jian he supplied a broader constraint-property preservation proposal for ALTER TYPE and SET EXPRESSION and reported additional dump/restore bugs in #8; after testing it, shihao agreed in #9 to drop his narrower ALTER COLUMN TYPE patch and leave the older validation and NOT NULL problems outside this series.
- In #10, jian he added an error hint and partition regression test to the parent-enforcement fix and proposed making directly enforced inherited CHECK constraints local, allowing pg_dump to avoid an additional child-table scan under ACCESS EXCLUSIVE lock.
- shihao accepted that direction but identified child-only enforcement left behind by NO INHERIT in #11; jian discussed an analogous older validation-state bug and precedents for changing locality during restore in #12.
- The revised series #13 incorporated jian's parent-enforcement and local-definition work, added pg_dump handling for enforcement surviving NO INHERIT or a parent's DROP CONSTRAINT, and deliberately excluded NOT VALID constraints because merging could incorrectly mark them valid without scanning.
- jian endorsed the parent-enforcement patch in #14 but left the dump/restore locality decision open for regular inheritance, explaining that restored local constraints survive a parent's DROP CONSTRAINT and also raising a related NOT NULL locality question.
- Andrew Dunstan selected only the parent-enforcement fix in #15 and committed it as 8356d8e4db, matching the first patch of #13 apart from rebase metadata and an expanded commit message, with a backpatch through PostgreSQL 19.
- Andrew confirmed completion in #16; the PostgreSQL 19 parent-enforcement open item was closed, while the remaining dump/restore changes and broader constraint-property questions remained for later discussion.