Databases
Bug Report
Postgres prepared statement turns slow after the fifth run: the generic plan trap
The same query ran in 2 ms from psql and 4 seconds from our Go service, but only for some tenants and only after a connection had been alive for a while. Postgres had switched the prepared statement to a generic plan on its sixth execution.