model-writtenrun 5624 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut proposed unlogged sequences in June 2019 so serial and identity sequences could match unlogged tables, initially copying the sequence page into an init fork while leaving persistence-changing ALTER commands unfinished #1.
- Michael Paquier reproduced a crash after ALTER SEQUENCE and an unclean restart, and Peter traced it to sequence rewrites failing to preserve the init fork #2 #3.
- Andres Freund recommended initializing the init fork through the sequence-writing code instead of copying the main fork, with explicit WAL logging for the init fork and a narrower buffer flush #4.
- After a gap until February 2022, Peter revived the feature to support excluding unlogged sequences from logical replication, implemented fork-aware initialization, and added tests for the reported crash; the patch still used FlushRelationBuffers() and temporarily prohibited converting a table with an unlogged sequence to logged #7.
- Peter completed ALTER SEQUENCE SET LOGGED/UNLOGGED and automatic propagation from tables to owned sequences, removing the earlier conversion restriction #9.
- Peter extracted test-label and presentation cleanup from #9 into ae63017bdb, then resubmitted the remaining feature with simplified tests and rebase adjustments #10.
- Tomas Vondra supplied a revision enforcing matching persistence for owned sequences, but also questioned whether those restrictions would break upgrades or prevent useful logged sequences on unlogged tables #11.
- Andres Freund supported mixed persistence and preserving existing sequences during pg_upgrade, while David G. Johnston examined how ownership restrictions could break restoration of existing dumps #12 #13.
- Tomas proposed default inheritance with independent sequence changes, and Robert Haas argued that ownership should not prohibit mixed persistence; Tomas consequently agreed to discard the restrictive checks #19 #21 #22.
- Robert highlighted the special dump/restore problem for identity sequences, and Peter briefly considered requiring identity sequences to follow their tables before recognizing that pg_upgrade needed independent ALTER SEQUENCE support; Robert also argued that such changes should be reversible #25 #28 #29 #32.
- Peter's final revision retained the permissive behavior, added pg_dump commands to preserve identity-sequence persistence when it differs from the table, and documented creation defaults and independent changes; Tomas's restrictive checks and their tests were left out #33.
- David reviewed the final migration behavior and raised concerns about restoring dumps produced by older versions; Peter demonstrated preservation with the new pg_dump and explained that older SQL dumps could acquire changed defaults, so no additional syntax or compatibility change was added #34 #35 #37 #38.
- Peter briefly held the patch because logical replication of sequences might be reverted for PostgreSQL 15, then proceeded after off-list encouragement and committed #33 unchanged as 344d62fb9a; the thread ends with confirmation that unlogged sequences landed #39 #40.