PostgreSQL DevService does not enable max_prepared_transactions
for XA operations
#36934
Labels
max_prepared_transactions
for XA operations
#36934
Describe the bug
Having XA enabled in a Quarkus app (with
quarkus.datasource.jdbc.transactions=xa
in theapplication.properties
), and invoking two XA datasources in a@Transactional
method (or 1 datasource and 1 Resource Adapter), the following error happens when the transaction is committed:Enabling the
max_prepared_transactions
to a non-zero value (as stated in the exception message) fixes it.Expected behavior
No errors while committing the transaction
Actual behavior
The exception message is shown
How to Reproduce?
Create a Quarkus application with two XA datasources (one of them being a PostgreSQL DevService) and perform any operation in a
@Transactional
method. The error will be displayed when the transaction is committed.Output of
uname -a
orver
macOS m1
Output of
java -version
JDK 17
Quarkus version or git rev
3.5.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.2
Additional information
Setting the
max_prepared_transactions
parameter to100
fixes it, but it should preferably be enabled only if XA is enabled - https://stackoverflow.com/questions/45793501/recommended-way-to-configure-max-prepared-transactions-in-postgres-on-kubernetesThe text was updated successfully, but these errors were encountered: