Statement timeout logging

From: Thom Brown <thom(at)linux(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Statement timeout logging
Date: 2013-06-06 15:01:52
Message-ID: CAA-aLv7gt0HbzVnspWv6wqBD2Bz0YT02JdA3t+53ZxoUvKxdTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

When a statement is cancelled due to it running for long enough for
statement_timeout to take effect, it logs a message:

ERROR: canceling statement due to statement timeout

However, it doesn't log what the timeout was at the time of the
cancellation. This may be set in postgresql.conf, the database, or on
the role, but unless log_line_prefix is set to show the database name
and the user name, there's no reliable way of finding out what context
the configuration applied from. Setting log_duration won't help
either because that only logs the duration of completed queries.

Should we output the statement_timeout value when a query is cancelled?

--
Thom

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2013-06-06 15:13:35 Re: Processing long AND/OR lists
Previous Message Heikki Linnakangas 2013-06-06 14:52:59 Re: Hard limit on WAL space used (because PANIC sucks)