pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: davecramer (@davecramer) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #3897: fix: issue #3892, PGXAConnection.prepare(Xid) should return XA_RDONLY if the connection is read only
Date: Tue, 06 Jan 2026 10:47:35 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
After doing more reading I'm not even sure we should be returning XA_RDONLY at all, this is the job of the XA manager. XA_RDONLY is returned by prepare when no data has changed, ie the transaction only reads data. As such no commit is necessary. see https://www.ibm.com/docs/en/i/7.6.0?topic=applications-example-using-cli-xa-transaction-connection-a... or https://docs.oracle.com/javase/8/docs/api/javax/transaction/xa/XAResource.html#XA_RDONLY. If in fact you provide a read only connection and a writer connection and expect data to be written the correct thing to do here is throw an exception as the data was not written and can't possibly be written.
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #3897: fix: issue #3892, PGXAConnection.prepare(Xid) should return XA_RDONLY if the connection is read only
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox