Re: unlogged sequences

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-04-03T23:58:13Z
Lists: 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?)

[1] https://www.postgresql.org/docs/current/app-pgdump.html

David J.

Commits

  1. Unlogged sequences

  2. Preparatory test cleanup