How to log canceled SQL statement due to statement timeout

From: Eric Comeau <ecomeau(at)signiant(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: How to log canceled SQL statement due to statement timeout
Date: 2011-04-13 12:06:50
Message-ID: io43kp$1qpj$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

We currently have statement timeout set

statement_timeout = 10800000 # 3 hrs

and we receive the following in the postgresql.log

[1-1] ERROR: canceling statement due to statement timeout

Is there a way to have the SQL statement logged as well?

We have set the log_min_duration_statement = 5000 to log any SQL
statement that takes longer than 5 secs and this works when the
statement complete.

We are using version 8.1.17

Thanks,
Eric

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2011-04-13 16:37:16 Re: How to log canceled SQL statement due to statement timeout
Previous Message Vibhor Kumar 2011-04-13 11:58:48 Re: unsupported header version error