Re: A patch for get origin from commit_ts.

From: Madan Kumar <madankumar1993(at)gmail(dot)com>
To: "movead(dot)li(at)highgo(dot)ca" <movead(dot)li(at)highgo(dot)ca>
Cc: michael <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, craig(at)2ndquadrant(dot)com, petr(at)2ndquadrant(dot)com, alvherre(at)2ndquadrant(dot)com, andres(at)anarazel(dot)de, soumyadeep2007(at)gmail(dot)com
Subject: Re: A patch for get origin from commit_ts.
Date: 2020-06-30 01:17:27
Message-ID: CAMtsaPEm47-mD5br8O8fVsZ0PnowtNij4O3UNsuG6Zb7dSCAaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hackers,

We already have pg_xact_commit_timestamp() that returns the timestamp of
the commit. It may be better to have one single function returning both
timestamp and origin for a given transaction ID.

A second thing is that TransactionIdGetCommitTsData() was introdued in
core(73c986add). It has only one caller pg_xact_commit_timestamp() which
passes RepOriginId as NULL, making last argument to the
TransactionIdGetCommitTsData() a dead code in core.

Quick code search shows that it is getting used by pglogical (caller:
https://sources.debian.org/src/pglogical/2.3.2-1/pglogical_conflict.c/?hl=509#L509)
CCing Craig Ringer and Petr Jelinek for the inputs.

Warm Regards,
Madan Kumar K
"There is no Elevator to Success. You have to take the Stairs"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-06-30 01:17:29 Re: More efficient RI checks - take 2
Previous Message Masahiko Sawada 2020-06-30 01:08:14 Re: Resetting spilled txn statistics in pg_stat_replication