Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
11 lines
849 B
Plaintext
11 lines
849 B
Plaintext
# a provider that does not reset search_path on release (tenancy.mode=leaky), pool size 1
|
|
|
|
== Hibernate finished a request as acme and gave the connection back; now an unrelated component borrows it
|
|
-- direct DataSource connection, tenant context empty
|
|
show search_path -> acme
|
|
select count(*) from invoice -> 1 (acme's data, read with no tenant at all)
|
|
|
|
== the same experiment with the correct provider (resetOnRelease=true), pool size 1, provider called the way Hibernate calls it
|
|
-- after getConnection("acme") + releaseConnection("acme", ..): show search_path -> "$user", public
|
|
-- select count(*) from invoice -> java.lang.IllegalStateException: org.postgresql.util.PSQLException: ERROR: relation "invoice" does not exist <- caused by org.postgresql.util.PSQLException: ERROR: relation "invoice" does not exist
|