Re: BUG #18618: pg_upgrade from 14 to 15+ fails for unlogged table with identity column
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-bugs@lists.postgresql.org
Cc: erwaman@gmail.com, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Date: 2024-09-17T19:56:13Z
Lists: pgsql-bugs
I wrote: >> The only alternative I can see is to extend the ALTER TABLE ADD >> GENERATED syntax to allow correct specification of the sequence's >> LOGGED/UNLOGGED status to begin with. While cleaner, that would be >> a lot more work and probably result in compatibility problems for >> normal uses of pg_dump (where the output might get loaded into a >> server version that lacks the syntax extension). > So we have to do it like that, and it seems not that bad, especially > if we follow the lead of the SEQUENCE NAME option and don't bother > to document this stuff. (I don't think that's a great precedent, > but I didn't change it here.) Pushed with a bit of further polishing, including adding that missing documentation. regards, tom lane
Commits
-
Repair pg_upgrade for identity sequences with non-default persistence.
- f7567f9e53d7 17.0 landed
- 918e21d25178 18.0 landed
- fc2d1ac1ad44 15.9 landed
- b8b175a4c895 16.5 landed
-
Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN
- d17a3a4c6a34 15.7 cited