fix: make PgBouncer prepared statement disabling configurable

Use PDO::PGSQL_ATTR_DISABLE_PREPARES with DB_DISABLE_PREPARES env variable
to prevent "cached plan must not change result type" errors during rolling
deployments with PgBouncer. Defaults to false for normal operation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2026-01-05 13:16:28 +01:00
parent 84c89a83b8
commit 3eacaa325b

View file

@ -49,7 +49,7 @@
'search_path' => 'public',
'sslmode' => 'prefer',
'options' => [
PDO::ATTR_EMULATE_PREPARES => true,
PDO::PGSQL_ATTR_DISABLE_PREPARES => env('DB_DISABLE_PREPARES', false),
],
],