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