Re: Retrieve the snapshot's LSN

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Retrieve the snapshot's LSN
Дата
Msg-id 20150716171343.GS5520@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Retrieve the snapshot's LSN  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Retrieve the snapshot's LSN  (Florent Guiliani <florent@guiliani.fr>)
Список pgsql-hackers
On 2015-07-16 13:08:48 -0400, Robert Haas wrote:
> On Thu, Jul 16, 2015 at 12:54 PM, Andres Freund <andres@anarazel.de> wrote:
> > Well, in combination with logical decoding it kinda has one: It should
> > allow you to take a dump of the database with a certain snapshot and
> > replay all transactions with a commit lsn bigger than the "snapshot's
> > lsn" and end up with a continually consistent database.
> >
> > Visibility for HS actually works precisely in commit LSN order, even if
> > that is possibly different than on the primary...
>
> That makes sense, and hopefully answers Florent's question about why
> this is only exposed through the slot mechanism.

Trying to swap-in the pub conversion, I think Florent wanted to be able to
re-sync a standby from an existing slot. Which kinda makes sense to
me. We could do something like
SELECT * FROM pg_export_snapshot_for_slot(...);

which would return the snapshot name and the LSN.

There'd need to be some finicky locking to get that, but it should b epossible.

Andres



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

Предыдущее
От: dinesh kumar
Дата:
Сообщение: Re: proposal: multiple psql option -c
Следующее
От: Ryan Pedela
Дата:
Сообщение: Re: [PATCH] Generalized JSON output functions