Re: [9.1] 2 bugs with extensions - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [9.1] 2 bugs with extensions
Date
Msg-id 1349274707-sup-3929@alvh.no-ip.org
Whole thread Raw
In response to Re: [9.1] 2 bugs with extensions  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Excerpts from Dimitri Fontaine's message of mié sep 26 11:36:38 -0300 2012:

> Marko Kreen <markokr@gmail.com> writes:
> > 1) Dumpable sequences are not supported - if sequence is tagged
> >    with pg_catalog.pg_extension_config_dump(), the pg_dump tries
> >    to run COPY on it.
>
> I can only reproduce that in 9.1. I first tried in HEAD where pg_dump
> will just entirely skip the sequence, which is not the right answer
> either, but at least does not spit out that message.
>
> > pg_dump: Error message from server: ERROR:  cannot copy from sequence
> > "batch_id_seq"
> > pg_dump: The command was: COPY pgq.batch_id_seq  TO stdout;
>
> Please find attached a patch that fixes it in 9.1, in all classic
> pg_dump, --data-only and --schema-only.
>
>  git diff --stat
>   src/bin/pg_dump/pg_dump.c |   68 +++++++++++++++++++++++++++++++++++---------
>   1 files changed, 54 insertions(+), 14 deletions(-)
>
> Once that's ok for 9.1, I'll get to work on a fix for master, oh and
> look at what the situation is in 9.2, which I guess is the same as in
> master actually.

I had a look at the patches submitted by Dimitri and in my tests they do
exactly what's intended, i.e. produce a data dump of the extension's
config sequences when necessary.  However, after a couple of hours
trying to understand what the patches are *doing* I failed to figure it
out completely, and I'm afraid that there might be secondary side
effects that I'm failing to notice.  So I'm punting this to Tom, who
seems to be the author of this code.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Support for REINDEX CONCURRENTLY
Next
From: Andres Freund
Date:
Subject: Re: Support for REINDEX CONCURRENTLY