postgres canceling statement due to statement timeout
Postgres 15. A nightly job started failing with: ERROR: canceling statement due to statement timeout CONTEXT: SQL statement "DELETE FROM sessions WHERE expires_at < now()" We set statement_timeout = '30s' globally. The delete used to finish in a few seconds. What changed and how do I debug it? The job runs against a large table, so I'd prefer to understand the cause rather than just raise the timeout.
4 replies