- Adds pg dependency for direct PostgreSQL connections to tenant DBs - TenantConnectionManager: singleton managing Map<tenantId, Pool> - provisionDatabase: creates new DB with tables and indexes - deprovisionDatabase: soft-deletes by renaming DB - Automatic idle pool cleanup every 60s (5min threshold) - Max 3 connections per pool (6/tenant with 2 PM2 workers) - Graceful shutdown support for all pools Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
166 KiB
166 KiB