mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-14 22:21:24 +00:00
Introduce the native Rust connection pool that both the Rust-native query path and the Python-facing Connection/Cursor shim will draw from, so we run a single pool rather than two that could exhaust the server's connection limit between them. Uses the generic deadpool::managed pool with our own ConnectionManager (rather than deadpool-postgres) so connection creation reuses the existing connect/default-host logic and connection-task spawning. The pooled item is a plain tokio_postgres::Client, used with the standard async query functions; recycle() drops connections the driver reports closed. Live tests are gated on SYNAPSE_TEST_POSTGRES_DSN. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>