Re: track_commit_timestamp and COMMIT PREPARED

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: track_commit_timestamp and COMMIT PREPARED
Date: 2015-09-05 10:48:01
Message-ID: 55EAC861.5000306@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-09-02 16:14, Fujii Masao wrote:
> On Wed, Aug 5, 2015 at 2:16 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Mon, Aug 3, 2015 at 10:31 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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.

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

Attachment Content-Type Size
committs-2pcfix.diff text/x-diff 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-09-05 12:03:20 Re: Is this a bug?
Previous Message Ildus Kurbangaliev 2015-09-05 09:48:12 [PATCH] Refactoring of LWLock tranches