You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AsyncCommitIntegrator Aurora detection logs "ERROR: function aurora_version() does not exist" in the PostgreSQL server log on every startup #51792
I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
storage
Describe the bug
Since 26.7.0, AsyncCommitIntegrator.isAuroraWithLogicalReplication() runs SELECT aurora_version() on startup to detect Aurora PostgreSQL. On standard PostgreSQL the function does not exist, so the database server logs
ERROR: function aurora_version() does not exist
STATEMENT: SELECT aurora_version()
once per Keycloak instance start. Keycloak swallows the SQLException and behaves correctly, but the PostgreSQL server log now carries an ERROR for every non-Aurora deployment, which trips log monitoring / alerting on the database side.
Version
26.7.1
Regression
The issue is a regression
Expected behavior
Aurora detection that does not produce a server-side error on standard PostgreSQL — e.g. SELECT to_regproc('aurora_version') IS NOT NULL (or a lookup in pg_proc), and only call aurora_version() if the function exists.
Actual behavior
SELECT aurora_version() is executed unconditionally; PostgreSQL logs it at ERROR level. Absent in 26.6.4.
How to Reproduce?
Start Keycloak 26.7.1 with --db=postgres against a standard PostgreSQL 16/17.
Check the PostgreSQL server log during Keycloak startup.
Anything else?
Introduced by #49750; the Aurora gate is discussed in #49990. Setting --spi-connections-jpa--quarkus--async-commit=false avoids the probe but also disables the async-commit optimisation, so it is not a real workaround.
Activity
Avoid aurora_version() probe on standard PostgreSQL
Avoid aurora_version() probe on standard PostgreSQL
Avoid aurora_version() probe on standard PostgreSQL
Avoid aurora_version() probe on standard PostgreSQL