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

From Craig Ringer
Subject Re: Way to access LSN (for each transaction) by directly talking to postgres?
Date
Msg-id CAMsr+YH4sUm5UAkfBFJC+90xB6PJiP4j89NXT3M_776pDvgXzw@mail.gmail.com
Whole thread Raw
In response to Re: Way to access LSN (for each transaction) by directly talking to postgres?  (Joshua Bay <joshuabay93@gmail.com>)
List pgsql-hackers
On 4 August 2016 at 01:35, Joshua Bay <joshuabay93@gmail.com> wrote:
Thanks for responses!

The problem I wanted to solve was to find the (global) order of commits across the postgres cluster. So, my attempt was to use the LSN.

Have a look at how logical decoding does it. Check out ReorderBufferCommit in src/backend/replication/logical/reorderbuffer.c  .

Or just write a trivial a logical decoding plugin that only implements the commit callback and only emits the LSN.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: PostgreSQL 10 kick-off
Next
From: Bruce Momjian
Date:
Subject: Re: Lossy Index Tuple Enhancement (LITE)