Subject: Re: [HACKERS] statement_timeout logging

From: Bruce Momjian <[email-masked]>
Date: Fri, 16 Sep 2005 15:41:11 -0400 (EDT)

pgman wrote:
> Simon Riggs wrote:
> > Currently, when we set a statement_timeout and a query runs over that
> > time there is no log message to say that the statement has timed out. We
> > do get a message which says 
> > 	ERROR:  canceling query due to user request
> > and so in the server log it is impossible to tell the difference between
> > a query that has been cancelled deliberately by the user and a query
> > whose time(out) has come.
> 
> I have updated the message to:
> 
>      errmsg("canceling query due to user request or statement timeout")));

Oops.  Did we freeze the message strings already for this release?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email-masked]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---

From: Alvaro Herrera <[email-masked]>
Date: Fri, 16 Sep 2005 16:54:55 -0400

> Oops.  Did we freeze the message strings already for this release?

Not yet.

I'm not sure I agree with the wording though -- is there no way to tell
the difference?

-- 
Alvaro Herrera -- Valdivia, Chile         Architect, www.EnterpriseDB.com
"No single strategy is always right (Unless the boss says so)"
                                                  (Larry Wall)

---

From: Bruce Momjian <[email-masked]>
Date: Sat, 17 Sep 2005 00:31:16 -0400 (EDT)

Simon Riggs wrote:
> >Alvaro Herrera
> Yes, my patch. :-)
> The message is generated following receipt of a SIGINT which is sent by
> kill() after the statement_timeout.
> 
> My patch was able to generate a different message by logging just before
> the kill() is called. (Obviously, there isn't much "after" in this
> circumstance).

Your patch just prints a statement "before" printing the cancel message.
What we should do is to print the proper cause of the cancel, and I am
working on a patch for that.

---

From: "Simon Riggs" <[email-masked]>
Date: Sat, 17 Sep 2005 00:02:23 -0700

Yes, my patch. :-)

Best Regards, Simon Riggs