pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: CTH57 (@CTH57) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] issue #3892: org.postgresql.xa.PGXAConnection.prepare(Xid) should return XA_RDONLY
Date: Mon, 08 Dec 2025 10:20:52 +0000
Message-ID: <[email protected]> (raw)
**Describe the issue**
This issue is a possible misalignment of pgjdbc from the XA specification.
PGXAConnection.prepare(Xid) should return XA_RDONLY when the connection is read-only.
Instead, PGXAConnection.prepare(Xid) tries to execute an update on the connection, which inevitably fails.
**Driver Version?**
42.7.8
**Java Version?**
21.0.6
**OS Version?**
**PostgreSQL Version?**
17.4
**To Reproduce**
Create a XATransaction with at least one readonly connection
**Expected behaviour**
No exception when commit the transaction
**Logs**
```
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] issue #3892: org.postgresql.xa.PGXAConnection.prepare(Xid) should return XA_RDONLY
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