From: | James Coleman <jtc331(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add last commit LSN to pg_last_committed_xact() |
Date: | 2022-01-19 01:32:40 |
Message-ID: | CAAaqYe-S+TmZb_T562Qp2EM+HmiVpaNDz5B6wkxStengoDY9pg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 18, 2022 at 8:05 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> On 2022-01-18 18:31:42 -0500, James Coleman wrote:
> > One other question on this: if we went with this would you expect a
> > new function to parallel pg_last_committed_xact()?
>
> I don't think I have an opinion the user interface aspect.
>
>
> > Or allow the xid and lsn in the return of pg_last_committed_xact()
> > potentially not to match (of course xid might also not be present if
> > track_commit_timestamps isn't on)? Or would you expect the current xid and
> > timestamp use the new infrastructure also?
>
> When you say "current xid", what do you mean?
I mean the existing commitTsShared->xidLastCommit field which is
returned by pg_last_committed_xact().
> I think it might make sense to use the new approach for all of these.
I think that would mean we could potentially remove commitTsShared,
but before doing so I'd like to know if that'd break existing
consumers.
Alvaro: You'd mentioned a use case in pglogical; if we moved the
xidLastCommit (and possibly even the cached last timestamp) out of
commit_ts.c (meaning it'd also no longer be under the commit ts lock)
would that be a problem for the current use (whether in lock safety or
in performance)?
Thanks,
James Coleman
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-01-19 01:40:47 | Re: docs: pg_replication_origin_oid() description does not match behaviour |
Previous Message | Andres Freund | 2022-01-19 01:16:26 | Re: Adding CI to our tree |