Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 16B3B1337B51 for ; Wed, 20 Oct 2010 16:07:12 -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 62553-06 for ; Wed, 20 Oct 2010 19:07:05 +0000 (UTC) X-Greylist: delayed 00:22:43.827988 by SQLgrey-1.7.6 Received: from ulysses.lattica.com (lattica.com [204.14.19.114]) by mail.postgresql.org (Postfix) with ESMTP id B528F1337B50 for ; Wed, 20 Oct 2010 16:07:04 -0300 (ADT) Received: from localhost (ulysses.lattica.com [127.0.0.1]) by ulysses.lattica.com (Postfix) with ESMTP id CA3B2EA4003 for ; Wed, 20 Oct 2010 14:44:17 -0400 (EDT) X-Virus-Scanned: amavisd-new at lattica.com Received: from ulysses.lattica.com ([127.0.0.1]) by localhost (ulysses.lattica.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uFZrczJwLUW0 for ; Wed, 20 Oct 2010 14:44:16 -0400 (EDT) Received: from [192.168.3.11] (CPE00222d5a2ad0-CM00222d5a2acd.cpe.net.cable.rogers.com [99.230.157.51]) by ulysses.lattica.com (Postfix) with ESMTP id 18B2FEA4001 for ; Wed, 20 Oct 2010 14:44:16 -0400 (EDT) Subject: What is postmaster doing? From: Dimi Paun To: pgsql-performance@postgresql.org Content-Type: text/plain; charset="UTF-8" Organization: Lattica, Inc. Date: Wed, 20 Oct 2010 14:44:15 -0400 Message-ID: <1287600255.18151.58.camel@dimi.lattica.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit 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: 201010/317 X-Sequence-Number: 40735 Folks, I am running into a problem with the postmaster: from time to time, it runs for a long time. E.g., from top: 23425 postgres 20 0 22008 10m 10m R 99.9 0.5 21:45.87 postmaster I'd like to figure out what it is doing. How can I figure out what statement causes the problem? is there a way I can log all SQL statements to a file, together with the time it took to execute them? -- Dimi Paun Lattica, Inc.