8000 Evaluate YugabyteDB as a PostgreSQL database in tests by ahus1 · Pull Request #54731 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Evaluate YugabyteDB as a PostgreSQL database in tests - #54731

Draft
ahus1 wants to merge 4 commits into
keycloak:mainfrom
ahus1:is-54726-yugabyte
Draft

ahus1 wants to merge 4 commits into
keycloak:mainfrom
ahus1:is-54726-yugabyte

Conversation

@ahus1
@ahus1 ahus1 commented Nov 5, 2026
Copy link
Copy Markdown
Member

Closes #54726

[yugabyte ci]

Closes keycloak#54726

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
@ahus1 ahus1 self-assigned this Nov 5, 2026
ahus1 and others added 3 commits November 5, 2026 23:33
The post start command also runs for re-used containers, where
CREATE DATABASE failed as the database already existed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Quote the database name in the colocated database creation, allow a
configurable server start timeout (900s for Yugabyte), fall back to
DROP INDEX without CONCURRENTLY in the index checker, and tolerate
Yugabyte's duplicate key error and stale schema version in the index test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Closes keycloak#54726

YugabyteDB bumps the catalog version on every DDL statement, and a session using an older cached version fails with "schema version mismatch" on its next statement in the same transaction. Run Liquibase in auto-commit mode on YugabyteDB to avoid this, while keeping Keycloak's database lock in a transaction.

As auto-commit would make index builds wait for the lock transaction, create indexes with NONCONCURRENTLY, and strip it again in the DatabaseIndexChecker. Create the test database non-colocated, as a colocated database aborted the lock transaction during the migration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate current compatibility with YugabyteDB

1 participant

0