Re: A patch for get origin from commit_ts.

From: "movead(dot)li(at)highgo(dot)ca" <movead(dot)li(at)highgo(dot)ca>
To: michael <michael(at)paquier(dot)xyz>, petr <petr(at)2ndquadrant(dot)com>
Cc: simon <simon(at)2ndquadrant(dot)com>, madankumar1993 <madankumar1993(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, craig <craig(at)2ndquadrant(dot)com>, alvherre <alvherre(at)2ndquadrant(dot)com>, andres <andres(at)anarazel(dot)de>, soumyadeep2007 <soumyadeep2007(at)gmail(dot)com>
Subject: Re: A patch for get origin from commit_ts.
Date: 2020-07-04 10:01:28
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

>Thanks. Movead, please note that the patch is waiting on author?
>Could you send an update if you think that those changes make sense?

I make a patch as Michael Paquier described that use a new function to
return transactionid and origin, and I add a origin version to
pg_last_committed_xact() too, now it looks like below:

postgres=# SELECT txid_current() as txid \gset
postgres=# SELECT * FROM pg_xact_commit_timestamp_origin(:'txid');
timestamp | origin
2020-07-04 17:52:10.199623+08 | 1
(1 row)

postgres=# SELECT * FROM pg_last_committed_xact_with_origin();
xid | timestamp | origin
506 | 2020-07-04 17:52:10.199623+08 | 1
(1 row)


Highgo Software (Canada/China/Pakistan)
EMAIL: mailto:movead(dot)li(at)highgo(dot)ca

Attachment Content-Type Size
get_origin_from_commit_ts_v3.patch application/octet-stream 15.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-07-04 11:36:44 Re: warnings for invalid function casts
Previous Message Amit Kapila 2020-07-04 09:19:46 Re: Default setting for enable_hashagg_disk (hash_mem)