Re: Add last commit LSN to pg_last_committed_xact()

From: James Coleman <jtc331(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add last commit LSN to pg_last_committed_xact()
Date: 2022-01-18 18:55:56
Message-ID: CAAaqYe_Phonup0tivOG4dHuTVcKOPbqaV7dhLwNqiqDVfsU1LQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 18, 2022 at 1:52 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2022-Jan-18, James Coleman wrote:
>
> > Reading the code it seems the only usage (besides
> > the boolean activation status also stored there) is in
> > TransactionIdGetCommitTsData, and the only consumers of that in core
> > appear to be the SQL callable functions to get the latest commit info.
> > It is in commit_ts.h though, so I'm guessing someone is using this
> > externally (and maybe that's why the feature has the shape it does).
>
> Logical replication is the intended consumer of that info, for the
> purposes of conflict handling. I suppose pglogical uses it, but I don't
> know that code myself.
>
> [ ... greps ... ]
>
> Yeah, that function is called from pglogical.

That's interesting, because my use case for the lsn is also logical
replication (monitoring).

James Coleman

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-01-18 18:58:34 Re: Adding CI to our tree
Previous Message Robert Haas 2022-01-18 18:55:22 Re: refactoring basebackup.c