pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to log canceled SQL statement due to statement timeout
3+ messages / 2 participants
[nested] [flat]
* How to log canceled SQL statement due to statement timeout
@ 2011-04-13 12:06 Eric Comeau <ecomeau@signiant.com>
0 siblings, 1 reply; 3+ messages in thread
From: Eric Comeau @ 2011-04-13 12:06 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to log canceled SQL statement due to statement timeout
@ 2011-04-13 16:37 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: Eric Comeau <ecomeau@signiant.com>
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Grittner @ 2011-04-13 16:37 UTC (permalink / raw)
To: pgsql-admin; Eric Comeau <ecomeau@signiant.com>
Eric Comeau <ecomeau@signiant.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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to log canceled SQL statement due to statement timeout
@ 2011-04-14 10:36 Eric Comeau <ecomeau@signiant.com>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 0 replies; 3+ messages in thread
From: Eric Comeau @ 2011-04-14 10:36 UTC (permalink / raw)
To: pgsql-admin
On 11-04-13 12:37 PM, Kevin Grittner wrote:
> Eric Comeau<ecomeau@signiant.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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-04-14 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13 12:06 How to log canceled SQL statement due to statement timeout Eric Comeau <ecomeau@signiant.com>
2011-04-13 16:37 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-04-14 10:36 ` Re: How to log canceled SQL statement due to statement timeout Eric Comeau <ecomeau@signiant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox