Re: tracking commit timestamps - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: tracking commit timestamps
Date
Msg-id CAB7nPqSpxcFkZMs7cyYiqmh8j0c2nzx6vY=O3KAkukGKW9cyag@mail.gmail.com
Whole thread Raw
In response to Re: tracking commit timestamps  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Wed, Nov 26, 2014 at 1:51 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 25 November 2014 at 16:18, Petr Jelinek <petr@2ndquadrant.com> wrote:
>
>> Won't the pg_last_committed_xact() on slave + pg_xact_commit_timestamp() on
>> master with the xid returned by slave accomplish the same thing?
>
> Surely the pg_last_committed_xact() will return the same value on
> standby as it did on the master?

It should. Now it needs some extra help as well as in its current
shape this patch will WAL log a commit timestamp if the Node ID is
valid, per RecordTransactionCommit. The node ID can be set only
through CommitTsSetDefaultNodeId, which is called nowhere actually. So
if an extension or an extra library needs to do some leg work to have
to allow this information to be replayed on other nodes.
Regards,
-- 
Michael



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: 9.2 recovery/startup problems
Next
From: Michael Paquier
Date:
Subject: Re: Proposal : REINDEX SCHEMA