Re: statement_timeout logging - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: statement_timeout logging
Date
Msg-id 1127063204.4015.57.camel@localhost.localdomain
Whole thread Raw
In response to Re: statement_timeout logging  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: statement_timeout logging
List pgsql-hackers
On Fri, 2005-09-16 at 20:48 -0400, Bruce Momjian wrote:
> We can go three ways.  We can add a boolean GUC to control printing of
> the query during a timeout, but that seems like overkill.  We can add a
> new level for log_min_error_statement that is just above error, but that
> seems confusing.  I think the right solution would be to allow
> log_min_duration_statement to work for canceled queries.  Right now,
> log_min_duration_statement doesn't work for canceled queries because the
> query never completes to give a final duration and hit the test code. 
> Should that be fixed now or added to the TODO list?

The last one seems the right way to go.  

So, reformat the message at statement_timeout, so that the log looks
exactly like log_min_duration_statement:

e.g.

LOG: statement_timeout has been activated to cancel statement
LOG: duration 1625652ms statement SELECT * from bigOne
LOG: query has been cancelled by user action

Perhaps we should change the message from kill() to be "statement"
rather than "query" also...

I'd vote fix now, but I guess that seems to be becoming a regular
viewpoint from me.

Best Regards, Simon Riggs





pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Spinlocks, yet again: analysis and proposed patches
Next
From: Martijn van Oosterhout
Date:
Subject: Does anybody use ORDER BY x USING y?