-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL DevService does not enable max_prepared_transactions
for XA operations
#36934
Comments
/cc @geoand (devservices,kubernetes), @iocanel (kubernetes), @stuartwdouglas (devservices) |
I've also see the advice to also set |
Well, I think we can add this line to the application.properties to enable XA on pregresSQL devservice
|
The postgres doc also advices this:
|
By setting --max_prepared_transactions=100 if max_prepared_transactions is not present in the command. Fixes quarkusio#36934
I think it makes sense to have the Dev Service as capable as possible. I prepared: #45307 |
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: