On Thu, Mar 31, 2022 at 6:03 PM Robert Haas <robertmh...@gmail.com> wrote:

>
> In this new system, does the user still get a logged sequence? If they
> get an unlogged sequence, how does dump-and-restore work? What if they
> want to still have a logged sequence? But for sequences that are
> simply owned, there is no problem here, and I think that inventing one
> would not be a good plan.
>

There is no design problem here, just coding (including special handling
for pg_upgrade).  When making a sequence owned we can, without requiring
any syntax, choose to change its persistence to match the table owning it.
Or not.  These are basically options 1 and 2 I laid out earlier:

https://www.postgresql.org/message-id/CAKFQuwY6GsC1CvweCkgaYi-%2BHNF2F-fqCp8JpdFK9bk18gqzFA%40mail.gmail.com

I slightly favor 1, making owned sequences implementation details having a
matched persistence mode.  But we seem to be leaning toward option 2 per
subsequent emails. I'm ok with that - just give me an easy way to change
all my upgraded logged sequences to unlogged.  And probably do the same if
I change my table's mode as well.

That there is less implementation complexity is nice but the end user won't
see that.  I think the typical end user would appreciate having the
sequence stay in sync with the table instead of having to worry about those
kinds of details.  Hence my slight favor given toward 1.

David J.

Reply via email to