fix: fix: asyncpg bouncer connection pool error

Prepared statement caching is disabled by setting
`statement_cache_size=0` in the `asyncpg` connection pool parameters.
This is necessary to prevent
`asyncpg.exceptions.InvalidSQLStatementNameError` when using
transaction-level connection poolers like Supabase Supavisor or
pgbouncer, which do not support prepared statements.
This commit is contained in:
kevinnkansah 2025-10-06 00:36:25 +02:00
parent 108cdbe133
commit d8a9617c0e

View file

@ -161,6 +161,7 @@ class PostgreSQLDB:
"port": self.port,
"min_size": 1,
"max_size": self.max,
"statement_cache_size": 0,
}
# Add SSL configuration if provided