Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0D9A91337BCF for ; Thu, 14 Apr 2011 07:56:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 71805-04 for ; Thu, 14 Apr 2011 10:56:29 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 06D911337B9C for ; Thu, 14 Apr 2011 07:56:29 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id p3EAuSfG080161 for ; Thu, 14 Apr 2011 07:56:28 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p3EAaDBb047090 for pgsql-admin@postgresql.org; Thu, 14 Apr 2011 07:36:13 -0300 (ADT) (envelope-from news) From: Eric Comeau X-Newsgroups: pgsql.admin Subject: Re: How to log canceled SQL statement due to statement timeout Date: Thu, 14 Apr 2011 06:36:13 -0400 Organization: Hub.Org Networking Services Lines: 24 Message-ID: References: <4DA58AEC020000250003C79C@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 In-Reply-To: <4DA58AEC020000250003C79C@gw.wicourts.gov> To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_40=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/138 X-Sequence-Number: 37319 On 11-04-13 12:37 PM, Kevin Grittner wrote: > Eric Comeau 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