laravel / nova-issues

557 stars 34 forks source link

Issues with PostgreSQL connection pooling #2352

Closed henryavila closed 4 years ago

henryavila commented 4 years ago

Description:

PostgreSQL database clusters use PgBouncer for connection pooling and prepared statements are not supported in transaction pooling mode

Steps To Reproduce:

Runing Laravel Nova with a PostgreSQL using connection pooling provided by PgBouncer, will throw erros like:

SQLSTATE[26000]: Invalid sql statement name: 7 ERROR: prepared statement "pdo_stmt_00000001" does not exist (SQL: select * from "users" where "id" = 1 and "users"."deleted_at" is null limit 1)
jbrooksuk commented 4 years ago

Nova heavily uses prepared statements and so we won't be able to support PgBouncer.

JosephAdewole commented 2 years ago

I know this is closed, however, a tip is to use session pooling instead of transaction pooling in the pgbouncer configuration.