X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 297088B9CF6 for ; Sun, 6 Feb 2005 17:33:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36600-01 for ; Sun, 6 Feb 2005 17:32:40 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id BB14F8B9E1C for ; Sun, 6 Feb 2005 17:32:40 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j16HWbk2004985; Sun, 6 Feb 2005 12:32:38 -0500 (EST) To: "Simon Riggs" Cc: pgsql-admin@postgresql.org Subject: Re: log_duration In-reply-to: References: Comments: In-reply-to "Simon Riggs" message dated "Sat, 05 Feb 2005 15:10:04 -0800" Date: Sun, 06 Feb 2005 12:32:37 -0500 Message-ID: <4984.1107711157@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/50 X-Sequence-Number: 16218 "Simon Riggs" writes: > Further update on this: > We've isolated this issue to JDBC client access. Ah-hah, now it makes sense. I believe the JDBC driver always uses extended query protocol (parse/bind/execute messages). We know that that code path is a bit shy of a load with respect to statement logging, mainly because no one has worked out exactly what it ought to log and when. When you consider the possibilities for re-use of parsed statements and partial execution of portals, it's not clear what a "statement" is, let alone what its "duration" is. Maybe the real problem is that the GUC variables are defined in terms of a too simplistic view of the world. As a quick workaround until someone thinks of a better idea, it might be sufficient to attach logging code to the execute phase, and ignore the partial-execution issue. regards, tom lane