Skip to content

test(pgbouncer): verify tenant context cleanup on backend reuse - #28

Open
Agata-Proxima wants to merge 6 commits into
mainfrom
test/pgbouncer-transaction-context-reset
Open

Agata-Proxima wants to merge 6 commits into
mainfrom
test/pgbouncer-transaction-context-reset

Conversation

@Agata-Proxima

Copy link
Copy Markdown
Collaborator

Summary

  • Extend the PgBouncer transaction-pooling integration test with explicit backend-state cleanup assertions.
  • Verify transaction-local tenant markers are absent after both COMMIT and ROLLBACK.
  • Verify a session-scoped marker is removed by PgBouncer's configured DISCARD ALL reset before the same PostgreSQL backend PID is reused.
  • Keep the existing signed-tenant startup, role separation, RLS read/write denial, and missing/invalid token checks.

The synthetic proxima.tenant_id GUC is a cleanup probe only. Proxima authenticates tenant identity at startup and maps it to a dedicated PostgreSQL role; the test does not claim the Engine stores tenant identity in a GUC.

The existing Rust CI workflow runs this script on pull requests, so the new assertions will execute in CI.

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.

1 participant