Re: Better support of exported snapshots with pg_dump

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Better support of exported snapshots with pg_dump
Дата
Msg-id CAB7nPqQ6Qo1vbeYQhyfFcCyDybc62qdDsxvXB7oZzHKCCG98=A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Better support of exported snapshots with pg_dump  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Better support of exported snapshots with pg_dump
Список pgsql-hackers
On Fri, Oct 17, 2014 at 12:19 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, Oct 15, 2014 at 1:06 AM, Andres Freund <andres@2ndquadrant.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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Superuser connect during smart shutdown
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Superuser connect during smart shutdown