Add multitenancy module: Hibernate 7 @TenantId vs schema-per-tenant (shared pool + search_path, pool per tenant), JWT tenant filter, isolation failure modes on PostgreSQL 17 (Hibernate 7.4.14.Final, Spring Boot 4.1.2)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
This commit is contained in:
2026-10-29 05:52:26 +00:00
co-authored by Claude Sonnet 5.5
parent ef2d2aa8ea
commit 98f4ed7411
45 changed files with 1820 additions and 0 deletions
@@ -0,0 +1,15 @@
# schema-per-tenant, ONE HikariCP POOL PER TENANT, PostgreSQL (PostgreSQL 17.11)
== connections per pool, read from pg_stat_activity
config: tenancy.pool.max-size=3 (minimumIdle defaults to the same), 6 tenants touched, tenancy.mode=pool-per-tenant
pool-acme 3 connections
pool-any 3 connections
pool-globex 3 connections
pool-hooli 3 connections
pool-initech 3 connections
pool-stark 3 connections
pool-umbrella 3 connections
total across tenant pools: 21
pools created by the provider: 7 (6 tenants + 1 'any' pool used by Hibernate at bootstrap)
server max_connections: 100
search_path of an acme pool connection: acme