Re: unlogged sequences - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: unlogged sequences
Date
Msg-id CAKFQuwZjDD-_k-m8EWiNfcqhNrw-B-4LkjfPXi+D-a-rTt00FA@mail.gmail.com
Whole thread Raw
In response to Re: unlogged sequences  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: unlogged sequences  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
On Sun, Apr 3, 2022 at 12:36 PM Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
On 03.04.22 20:50, David G. Johnston wrote:
> However, tables having an identity sequence seem to be unaddressed in
> this patch.  The existing (and unchanged) pg_dump.c code results in:

It is addressed.  For example, run this in PG14:

create unlogged table t1 (a int generated always as identity, b text);

Then dump it with PG15 with this patch:

Sorry, I wasn't being specific enough.  Per our documentation (and I seem to recall many comments from Tom):
"Because pg_dump is used to transfer data to newer versions of PostgreSQL, the output of pg_dump can be expected to load into PostgreSQL server versions newer than pg_dump's version." [1]

That is what I'm getting on about when talking about migrations.  So a v14 SQL backup produced by a v14 pg_dump restored by a v15 psql. (custom format and pg_restore supposedly aren't supposed to be different though, right?)


David J.

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: CLUSTER sort on abbreviated expressions is broken
Next
From: Andres Freund
Date:
Subject: Re: JSON constructors and window functions