Re: [HACKERS] Retrieve the snapshot's LSN

2015-07-23 Thread Florent Guiliani
On Fri, Jul 17, 2015 at 6:53 PM, Robert Haas wrote: > On Fri, Jul 17, 2015 at 8:31 AM, Florent Guiliani wrote: >> A pg_export_snapshot_for_slot(...) would work very well. >> >> Let me explain the use case. You have many downstream systems that are >> replicated wit

Re: [HACKERS] Retrieve the snapshot's LSN

2015-07-17 Thread Florent Guiliani
On Thu, Jul 16, 2015 at 7:13 PM, Andres Freund wrote: > On 2015-07-16 13:08:48 -0400, Robert Haas wrote: >> On Thu, Jul 16, 2015 at 12:54 PM, Andres Freund wrote: >> > Well, in combination with logical decoding it kinda has one: It should >> > allow you to take a dump of the database with a certa

Re: [HACKERS] Retrieve the snapshot's LSN

2015-07-17 Thread Florent Guiliani
On Thu, Jul 16, 2015 at 6:40 PM, Robert Haas wrote: > I don't think "the snapshot's LSN" has a well-defined meaning in > general. The obvious meaning would be "the LSN such that all commits > prior to that LSN are visible and all later commits are invisible", I like this definition. > but such

[HACKERS] Retrieve the snapshot's LSN

2015-07-15 Thread Florent Guiliani
Hello everyone, I would need to start a read repeatable transaction and retrieve the corresponding LSN. I'm looking for pointers or Ideas on how to achieve this. Andres F. suggested me to extend pg_export_snapshot() [1] and call GetLatestSnapshot() [2] while reliably retrieving the current LSN. S