model-writtenrun 2988 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Anthony Hsu reported that upgrading an unlogged table with an identity column from PostgreSQL 14 to 15+ failed because the generated ALTER SEQUENCE SET LOGGED command requested a new relfilenode during binary upgrade #1.
- Tom Lane initially proposed directly changing the sequence's persistence in binary-upgrade mode, preferring that shortcut over extending identity-column syntax because of compatibility concerns #2.
- Further testing led Tom Lane to reject the shortcut: SET UNLOGGED encountered WAL-skipping assertions, and changing persistence also required adding or removing an initialization fork #3.
- Tom Lane replaced the shortcut with LOGGED/UNLOGGED identity-sequence options and taught pg_dump to emit them when sequence and table persistence differ, adding fixtures for both mismatch directions; he considered restricting the syntax to binary upgrades but judged the extra complexity unnecessary #3.
- The replacement landed as fc2d1ac1ad with a temporary-sequence guard and documentation for the persistence and SEQUENCE NAME options, with backports through PostgreSQL 15; Tom Lane's final message confirmed that the polished fix had been pushed #4.