Re: Add last commit LSN to pg_last_committed_xact() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Add last commit LSN to pg_last_committed_xact()
Date
Msg-id CA+TgmoZGMa20dbEHsrswX2P_xtpp2OWPcGqj3KA3U4cCy3=yZg@mail.gmail.com
Whole thread Raw
In response to Re: Add last commit LSN to pg_last_committed_xact()  (James Coleman <jtc331@gmail.com>)
List pgsql-hackers
On Tue, Jan 18, 2022 at 9:47 AM James Coleman <jtc331@gmail.com> wrote:
> > Well, if you're maintaining an SLRU, you do kind of need to know where
> > the leading and lagging ends are.
>
> As far as I can tell the data in commitTsShared is used purely as an
> optimization for the path looking up the timestamp for an arbitrary
> xid when that xid happens to be the most recent one so that we don't
> have to look up in the SLRU for that specific case. Maybe I'm missing
> something else you're seeing?

I wasn't looking at the code, but that use also seems closer to the
purpose of committs than your proposal.

> > As far as performance goes, I'm more concerned about Alvaro's patch.
> > My concern with this one is more around whether it's too much of a
> > kludge.
>
> As far as the kludginess factor: do you think additional GUCs would
> help clarify that? And/or are the earlier comments on the right path?

To be honest, I'm sort of keen to hear what other people think. I'm
shooting from the hip a little bit here...

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: Pluggable toaster
Next
From: Robert Haas
Date:
Subject: Re: Refactoring of compression options in pg_basebackup