From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Martin Pitt <mpitt@debian.org>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: 9.2beta1 regression: pg_restore --data-only does not set sequence values any more
Date: Mon, 21 May 2012 14:59:34 -0400
Message-ID: <4FBA9096.30107@dunslane.net> (raw)
In-Reply-To: <CAD5tBc+L3=MEz3KCjwrgcR82hU7qrm6qUZdCs89VGyQj-WgPiw@mail.gmail.com>
References: <20120515122500.GD3041@piware.de>
<23209.1337173706@sss.pgh.pa.us>
<CAD5tBc+L3=MEz3KCjwrgcR82hU7qrm6qUZdCs89VGyQj-WgPiw@mail.gmail.com>
On 05/16/2012 10:23 AM, Andrew Dunstan wrote:
>
>
> On Wed, May 16, 2012 at 9:08 AM, Tom Lane <tgl@sss.pgh.pa.us
> <mailto:tgl@sss.pgh.pa.us>> wrote:
>
> Martin Pitt <mpitt@debian.org <mailto:mpitt@debian.org>> writes:
> > while packaging 9.2 beta 1 for Debian/Ubuntu the postgresql-common
> > test suite noticed a regression: It seems that pg_restore
> --data-only
> > now skips the current value of sequences, so that in the upgraded
> > database the sequence counter is back to the default.
>
> I believe this is a consequence of commit
> a4cd6abcc901c1a8009c62a27f78696717bb8fe1, which introduced the
> entirely
> false assumption that --schema-only and --data-only have something to
> do with the order that entries appear in the archive ...
>
>
>
> Darn, will investigate.
>
>
[cc -hackers]
Well, the trouble is that we have these pesky SECTION_NONE entries for
things like comments, security labels and ACLs that need to be dumped in
the right section, so we can't totally ignore the order. But we could
(and probably should) ignore the order for making decisions about
everything BUT those entries.
So, here's a revised plan:
--section=data will dump exactly TABLE DATA, SEQUENCE SET or BLOBS
entries
--section=pre-data will dump SECTION_PRE_DATA items (other than
SEQUENCE SET) plus any immediately following SECTION_NONE items.
--section=post-data will dump everything else.
Comments?
cheers
andrew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andrew@dunslane.net, tgl@sss.pgh.pa.us, mpitt@debian.org, pgsql-hackers@postgresql.org
Subject: Re: 9.2beta1 regression: pg_restore --data-only does not set sequence values any more
In-Reply-To: <4FBA9096.30107@dunslane.net>
References: <20120515122500.GD3041@piware.de> <23209.1337173706@sss.pgh.pa.us> <CAD5tBc+L3=MEz3KCjwrgcR82hU7qrm6qUZdCs89VGyQj-WgPiw@mail.gmail.com> <4FBA9096.30107@dunslane.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox