From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> |
Cc: | Marko Kreen <markokr(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: [9.1] 2 bugs with extensions |
Date: | 2012-10-03 14:38:57 |
Message-ID: | 1349274707-sup-3929@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Excerpts from Dimitri Fontaine's message of mié sep 26 11:36:38 -0300 2012:
> Marko Kreen <markokr(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2012-10-03 14:52:17 | Re: Support for REINDEX CONCURRENTLY |
Previous Message | Tom Lane | 2012-10-03 14:28:59 | Re: Support for REINDEX CONCURRENTLY |