From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Better support of exported snapshots with pg_dump |
Date: | 2014-10-17 04:25:44 |
Message-ID: | CAB7nPqQ6Qo1vbeYQhyfFcCyDybc62qdDsxvXB7oZzHKCCG98=A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 17, 2014 at 12:19 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Oct 15, 2014 at 1:06 AM, Andres Freund <andres(at)2ndquadrant(dot)com>
> wrote:
> > I personally think we should just disregard the race here and add a
> > snapshot parameter. The race is already there and not exactly
> > small. Let's not kid ourselves that hiding it solves anything.
> I, too, favor that plan.
>
Two votes in favor of that from two committers sounds like a deal. Here is
an refreshed version of the patch introducing --snapshot from here, after
fixing a couple of things and adding documentation:
http://www.postgresql.org/message-id/CA+U5nMK9+TTCff_-4MfdxWHnASTAuHuq7u7uedD57vaY28AsQA@mail.gmail.com
When the snapshot specified by user is not a valid one, here is the error
returned by pg_dump:
$ pg_dump --snapshot 'ppo'
pg_dump: [archiver (db)] query failed: ERROR: invalid snapshot identifier:
"ppo"
pg_dump: [archiver (db)] query was: SET TRANSACTION SNAPSHOT 'ppo'
I thinks that's fine, and it makes the code lighter to rely on the existing
error machinery.
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20141017_pg_dump_snapshot.patch | text/x-patch | 6.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-10-17 04:29:17 | Re: Superuser connect during smart shutdown |
Previous Message | Tom Lane | 2014-10-17 04:25:16 | Re: Superuser connect during smart shutdown |