Re: A patch for get origin from commit_ts. - Mailing list pgsql-hackers

From movead.li@highgo.ca
Subject Re: A patch for get origin from commit_ts.
Date
Msg-id 202007041801258116499@highgo.ca
Whole thread Raw
In response to A patch for get origin from commit_ts.  ("movead.li@highgo.ca" <movead.li@highgo.ca>)
Responses Re: A patch for get origin from commit_ts.
List 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)

postgres=#
============================================

---
Regards,
Highgo Software (Canada/China/Pakistan)
URL : www.highgo.ca
EMAIL: mailto:movead(dot)li(at)highgo(dot)ca
Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Default setting for enable_hashagg_disk (hash_mem)
Next
From: Peter Eisentraut
Date:
Subject: Re: warnings for invalid function casts