Re: track_commit_timestamp and COMMIT PREPARED - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: track_commit_timestamp and COMMIT PREPARED
Date
Msg-id 20150929030524.GC295765@alvherre.pgsql
Whole thread Raw
In response to Re: track_commit_timestamp and COMMIT PREPARED  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: track_commit_timestamp and COMMIT PREPARED  (Petr Jelinek <petr@2ndquadrant.com>)
Re: track_commit_timestamp and COMMIT PREPARED  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Petr Jelinek wrote:
> On 2015-09-02 16:14, Fujii Masao wrote:
> >On Wed, Aug 5, 2015 at 2:16 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> >>On Mon, Aug 3, 2015 at 10:31 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> >>>track_commit_timestamp tracks COMMIT PREPARED as expected in standby server,
> >>>but not in master server. Is this intentional? It should track COMMIT PREPARED
> >>>even in master? Otherwise, we cannot use commit_timestamp feature to check
> >>>the replication lag properly while we use 2PC.
> >>
> >>That sounds like it must be a bug.  I think you should add it to the
> >>open items list.
>
> Attached fixes this. It includes advancement of replication origin as well.
> I didn't feel like doing refactor of commit code this late in 9.5 cycle
> though, so I went with the code duplication + note in xact.c.

Thanks, your proposed behavior looks reasonable.  I didn't like the
existing coding nor the fact that with your patch we'd have two copies
of it, so I changed a bit instead to be more understandable.  Hopefully I
didn't break too many things.  This patch includes the patch for the
other commitTS open item too.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: No Issue Tracker - Say it Ain't So!
Next
From: "Joshua D. Drake"
Date:
Subject: Re: No Issue Tracker - Say it Ain't So!