pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petr Jelinek <petr@2ndquadrant.com>
To: michael@paquier.xyz, Simon Riggs <simon@2ndquadrant.com>
Cc: Madan Kumar <madankumar1993@gmail.com>
Cc: movead.li@highgo.ca <movead.li@highgo.ca>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Álvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: soumyadeep2007@gmail.com
Subject: Re: A patch for get origin from commit_ts.
Date: Thu, 2 Jul 2020 10:12:02 +0200
Message-ID: <4ee522fa-b549-4a8d-9d9e-cb27be774627@2ndquadrant.com> (raw)
In-Reply-To: <20200702015852.GE10408@paquier.xyz>
References: <2020051116430836450630@highgo.ca>
	<20200512014537.GF88791@paquier.xyz>
	<2020051316291300911447@highgo.ca>
	<CAMtsaPEm47-mD5br8O8fVsZ0PnowtNij4O3UNsuG6Zb7dSCAaQ@mail.gmail.com>
	<CANP8+jJu-bta+4KBRDf2XKsHybDBY1Ew_zvcuoTdhES+ZWLGcQ@mail.gmail.com>
	<20200702015852.GE10408@paquier.xyz>

On 02/07/2020 03:58, michael@paquier.xyz wrote:
> On Tue, Jun 30, 2020 at 01:58:17PM +0100, Simon Riggs wrote:
>> On Tue, 30 Jun 2020 at 02:17, Madan Kumar <madankumar1993@gmail.com> wrote:
>>> It may be better to have one single function returning both
>>> timestamp and origin for a given transaction ID.
>>
>> No need to change existing APIs.
> 
> Adding a new function able to return both fields at the same time does
> not imply that we'd remove the original one, it just implies that we
> would be able to retrieve both fields with a single call of
> TransactionIdGetCommitTsData(), saving from an extra CommitTsSLRULock
> taken, etc.  That's actually what pglogical does with
> its pglogical_xact_commit_timestamp_origin() in
> pglogical_functions.c.  So adding one function able to return one
> tuple with the two fields, without removing the existing
> pg_xact_commit_timestamp() makes the most sense, no?


Agreed, sounds reasonable.

I also (I suspect like Álvaro) parsed your original message as wanting 
to remove origin from the record completely.

-- 
Petr Jelinek
2ndQuadrant - PostgreSQL Solutions for the Enterprise
https://www.2ndQuadrant.com/





view thread (31+ messages)  latest in thread

Message-ID: <4ee522fa-b549-4a8d-9d9e-cb27be774627@2ndquadrant.com>
Permalink:  ../4ee522fa-b549-4a8d-9d9e-cb27be774627@2ndquadrant.com/
Also on:    postgresql.org/message-id/4ee522fa-b549-4a8d-9d9e-cb27be774627@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: petr@2ndquadrant.com, simon@2ndquadrant.com, madankumar1993@gmail.com, movead.li@highgo.ca, pgsql-hackers@lists.postgresql.org, craig@2ndquadrant.com, alvherre@2ndquadrant.com, andres@anarazel.de, soumyadeep2007@gmail.com
  Subject: Re: A patch for get origin from commit_ts.
  In-Reply-To: <4ee522fa-b549-4a8d-9d9e-cb27be774627@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox