Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B9B341337B8B for ; Wed, 13 Apr 2011 09:26:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 39108-10 for ; Wed, 13 Apr 2011 12:26:27 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id DE0A61337B82 for ; Wed, 13 Apr 2011 09:26:26 -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 p3DCQQ79093907 for ; Wed, 13 Apr 2011 09:26:26 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p3DC6oqN061237 for pgsql-admin@postgresql.org; Wed, 13 Apr 2011 09:06:50 -0300 (ADT) (envelope-from news) From: Eric Comeau X-Newsgroups: pgsql.admin Subject: How to log canceled SQL statement due to statement timeout Date: Wed, 13 Apr 2011 08:06:50 -0400 Organization: Hub.Org Networking Services Lines: 18 Message-ID: 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 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/125 X-Sequence-Number: 37306 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