PostgreSQL statement timeout

Viewed 24200

PostgreSQL Version: 9.3

We have online system which gets transnational data (approximately 15000 records per day).

We have table partitioning on date & time and have a PostgreSQL function to load the incoming request into the table.

Sometimes we see the error message

ERROR: 57014: canceling statement due to statement timeout

The client sends the request again after some time if not successful and on second try it gets recorded successfully. It seems this has to be something with table locks but I am not sure.

1 Answers

Set log_lock_waits = on in postgresql.conf and see if you get log entries. That would tell you that a query is hanging for more than one second.

Related