>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) postgres=# ============================================ --- Regards, Highgo Software (Canada/China/Pakistan) URL : www.highgo.ca EMAIL: mailto:movead(dot)li(at)highgo(dot)ca
get_origin_from_commit_ts_v3.patch
Description: Binary data