PREPARE TRANSACTION for specific transaction branch/session - Mailing list pgsql-interfaces

From trn nrjn
Subject PREPARE TRANSACTION for specific transaction branch/session
Date
Msg-id CAP7o3-jnm-QpCsOOPpcQTM7+r9YCNh9odFPk-N2GkMGEm1=UyA@mail.gmail.com
Whole thread Raw
List pgsql-interfaces

Hi,Could you kindly assist with the below two queries? 

1) From the below Postgres logs, we would like to know whether there is a way by which we could make Postgres to attach or execute the 'prepare transaction <gtxnid>' calls invoked from a transaction manager’s xa_prepare(), to the process or session that started the transaction i.e. attach it to the session within the 'xa_start()' and 'xa_end()' calls below?

 

xa_start()

2022-01-18 17:48:26.067 UTC [21798] STATEMENT:  BEGIN 

2022-01-18 17:48:26.076 UTC [21798] LOG:  statement: SELECT COUNT(*) FROM table_1

2022-01-18 17:48:26.086 UTC [21798] LOG:  statement: SELECT COUNT(*) FROM table_2

2022-01-18 17:48:26.096 UTC [21798] LOG:  statement: update table_3 set col1 = 'test1' where col2 = 123

xa_end()

 

xa_prepare()

2022-01-18 17:48:26.108 UTC [21797] DEBUG:  StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0

2022-01-18 17:48:26.108 UTC [21797] STATEMENT:  PREPARE TRANSACTION 'transaction_name_1'

2022-01-18 17:48:26.108 UTC [21797] LOG:  statement: PREPARE TRANSACTION 'transaction_name_1'

2022-01-18 17:48:26.108 UTC [21797] WARNING:  there is no transaction in progress

2022-01-18 17:48:26.108 UTC [21797] STATEMENT:  PREPARE TRANSACTION 'transaction_name_1'

2022-01-18 17:48:26.108 UTC [21797] DEBUG:  CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0

2022-01-18 17:48:26.108 UTC [21797] STATEMENT:  PREPARE TRANSACTION 'transaction_name_1'

 

2) We would also like to know whether PostgreSQL can participate as XA resource manager with Tuxedo as Transaction Manager?

 

Thank you.

pgsql-interfaces by date:

Previous
From: Les
Date:
Subject: Re: psycopg3 - parameters cannot be used for DDL commands?
Next
From: Charles Kong
Date:
Subject: Use java interface "setArray" to insert the array of user-defined type to table