Re: Way to access LSN (for each transaction) by directly talking to postgres? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Way to access LSN (for each transaction) by directly talking to postgres?
Date
Msg-id CAB7nPqTeapPmZMfPmpviXoeNMzoeUGATxU-Gu0Hm_841vpYaBg@mail.gmail.com
Whole thread Raw
In response to Re: Way to access LSN (for each transaction) by directly talking to postgres?  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Way to access LSN (for each transaction) by directly talking to postgres?  (Joshua Bay <joshuabay93@gmail.com>)
List pgsql-hackers
On Wed, Aug 3, 2016 at 3:00 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Wed, Aug 3, 2016 at 12:37 PM, Joshua Bay <joshuabay93@gmail.com> wrote:
>> Could you please let me know if there is a way to get LSN of each
>> transaction by directly communicating with Postgres server and NOT by
>> accessing logs.
>
> Logical decoding is one way.

And I just saw your other message... What I just meant here is that if
you use a decoder plugin that just emits information at transaction
begin/commit you can directly get this information. There is no need
to directly look at the WAL logs, the server does it for you. And it
offers a good cover regarding the information that has already been
consumed or not.

(Btw, avoid sending emails across multiple mailing lists, particularly
pgsql-committers which is not aimed for that).
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Quorum commit for multiple synchronous replication.
Next
From: Simon Riggs
Date:
Subject: Re: Why we lost Uber as a user