Re: 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: Re: How to log canceled SQL statement due to statement timeout
Date: 2011-04-14 10:36:13
Message-ID: io6ims$1a00$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 11-04-13 12:37 PM, Kevin Grittner wrote:
> Eric Comeau<ecomeau(at)signiant(dot)com> wrote:
>
>> 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?
>
> log_min_error_statement = 'ERROR'
>
> -Kevin
>
This solved the problem. Thanks Kevin.

I was surprised to discover that the default for log_min_error_statement
is PANIC on 8.1, it appears they have changed the default from 8.2+ to
ERROR now.

Eric

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jerry Sievers 2011-04-14 11:13:19 Re: Warm Standby on 8.4.7
Previous Message Fredy Khan 2011-04-14 05:13:33 Re: unsupported header version error