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

From movead.li@highgo.ca
Subject A patch for get origin from commit_ts.
Date
Msg-id 2020051116430836450630@highgo.ca
Whole thread Raw
Responses Re: A patch for get origin from commit_ts.
List pgsql-hackers
Hello hackers,

I am researching about 'origin' in PostgreSQL, mainly it used in logical
decoding to filter transaction from non-local source.. I notice that the
'origin' is stored in commit_ts so that I think we are possible to get 'origin'
of a transaction from commit_ts.

But I can not fond any code to get 'origin' from commit_ts, just like it is
producing data which nobody cares about. Can I know what's the purpose
of the 'origin' in commit_ts? Do you think we should add some support
to the careless data?

For example, I add a function to get 'origin' from commit_ts:
=======================================
postgres=# select pg_xact_commit_origin('490');
 pg_xact_commit_origin 
-----------------------
 test_origin
(1 row)

postgres=# select pg_xact_commit_origin('491');
 pg_xact_commit_origin 
-----------------------
 test_origin1
(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: Kyotaro Horiguchi
Date:
Subject: Re: pg_regress cleans up tablespace twice.
Next
From: Antonin Houska
Date:
Subject: Re: 2pc leaks fds