Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 7C98F2E0035 for ; Mon, 31 Mar 2008 09:06:30 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 61081-02 for ; Mon, 31 Mar 2008 09:06:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by developer.postgresql.org (Postfix) with ESMTP id F3F052E0032 for ; Mon, 31 Mar 2008 09:06:28 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so1428814wxc.28 for ; Mon, 31 Mar 2008 05:06:27 -0700 (PDT) Received: by 10.70.2.32 with SMTP id 32mr7899245wxb.42.1206965186733; Mon, 31 Mar 2008 05:06:26 -0700 (PDT) Received: by 10.70.126.7 with HTTP; Mon, 31 Mar 2008 05:06:26 -0700 (PDT) Message-ID: Date: Mon, 31 Mar 2008 16:06:26 +0400 From: "Vladimir Rusinov" To: pgsql-admin@postgresql.org Subject: log_min_duration_statement log parsing MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3661_5006618.1206965186724" X-Archive-Number: 200803/273 X-Sequence-Number: 28756 ------=_Part_3661_5006618.1206965186724 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! I need a daily list of log-running statements. I've turned on log_min_duraion_statement and going to write script which would daily parse postgresql log and mail it to me, but I have no long-running statements (and don't wanna do specially) and I can't see any in my log file. How does they look? And may be someone have such script or other ideas how to log long-running statements in order to optimize them? -- Vladimir Rusinov Voronezh, Russia UNIX Admin @ Murano Software ------=_Part_3661_5006618.1206965186724 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello!

I need a daily list of log-running statements. I've turned on log_min_duraion_statement and going to write script which would daily parse postgresql log and mail it to me, but I have no long-running statements (and don't wanna do specially) and I can't see any in my log file. How does they look?

And may be someone have such script or other ideas how to log long-running statements in order to optimize them?

--
Vladimir Rusinov
Voronezh, Russia
UNIX Admin @ Murano Software ------=_Part_3661_5006618.1206965186724--