model-writtenrun 3363 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ashutosh Bapat opened the thread by demonstrating inconsistent identity behavior across partitioned tables and proposing inherited identity properties, one shared sequence, recursive column additions, and rejection of partitions with their own identities #1.
- Peter Eisentraut supported the proposal and requested documentation comparable to the generated-column documentation; Ashutosh confirmed that attaching a table with its own identity definition should be prohibited #2 #3.
- Ashutosh's initial implementation made partitions share the root table's sequence and lose their identity property when detached while retaining NOT NULL, with separate diagnostic tests explicitly excluded from the intended final patch #4.
- Peter agreed that NOT NULL must be established manually before attachment and committed the independent ancestor-order comment fix with wording edits as e557db106e #5.
- Ashutosh completed the series with recursive identity-property changes, rejection of independently defined partition identities, documentation, and broader regression coverage; he also supplied dump/restore and upgrade experiments expressly not intended for commitment #6.
- The independent productname markup and MergeAttributes() assertion patches from #6 landed unchanged as 58b20e6d75 and d22d98c341.
- Peter expanded and co-authored the identity-column documentation from #6, adding examples and explanations in a37bb7c139, initially leaving partition support for the following feature commit.
- Peter consolidated the feature and regression-test portions of #6, made light editorial changes, and added the partition documentation in 6995863157, announcing completion in #7.
- Post-commit review raised an outdated inheritance comment and missing recursion-depth checks; Ashutosh explained the existing assertion and directed the comment cleanup to a separate refactoring thread #9 #10 #11 #12 #13.
- Alexander Lakhin reproduced a stack overflow in ATExecSetIdentity() using an extremely deep partition hierarchy, and subsequent discussion narrowed the remaining concern to identity-related functions; the supplied thread does not record their stack-guard fix #14 #15 #16 #17.
- While examining recursion protection, Ashutosh found duplicate stack-depth checks in dropconstraint_internal(), Alexander Lakhin confirmed their origin, and Alexander Korotkov removed the redundant check in 75bcba6cbd without an attached patch #17 #18 #19.
- Alexander Lakhin later reported that CREATE TABLE LIKE a partition INCLUDING IDENTITY failed; when Ashutosh questioned whether that use case should work, Alexander argued that the supported syntax should be repaired rather than restricted #20 #21 #22.
- Alexander then demonstrated two more failures: changing an identity column's data type and inserting directly into an attached partition whose column order differed from its parent's #23 #24.
- Ashutosh supplied one patch for all three failures, moving root-sequence lookup and attribute-number translation into getIdentitySequence() and suppressing redundant ALTER SEQUENCE generation for partitions; Michael Paquier registered the failures as an open item #25 #26.
- Dmitry Dolgov reviewed the fix and questioned tuple validity, repeated ancestor lookup, and concurrency safety; Ashutosh explained the catalog and locking assumptions, and Dmitry accepted the performance rationale while retaining a defensive-check suggestion that was not incorporated #27 #28 #29.
- Peter committed the bugfix from #25 unchanged apart from whitespace and rebasing as 509199587d, announced it in #30, and received Ashutosh's acknowledgment in the final message #31, leaving the feature and all three reported sequence-lookup fixes landed.