Re: unlogged sequences

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unlogged sequences
Date: 2022-04-03 23:58:13
Message-ID: CAKFQuwZjDD-_k-m8EWiNfcqhNrw-B-4LkjfPXi+D-a-rTt00FA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Apr 3, 2022 at 12:36 PM Peter Eisentraut <
peter(dot)eisentraut(at)enterprisedb(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-04-04 00:11:56 Re: JSON constructors and window functions
Previous Message Thomas Munro 2022-04-03 23:33:28 Re: CLUSTER sort on abbreviated expressions is broken