X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 37A949FBFCA for ; Sat, 26 Aug 2006 08:34:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 99691-02 for ; Sat, 26 Aug 2006 11:34:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by postgresql.org (Postfix) with ESMTP id 972D49FBFBD for ; Sat, 26 Aug 2006 08:34:29 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d80so1616043pyd for ; Sat, 26 Aug 2006 04:34:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rv1vtTCau+2ZiMEELIKh58jhRfluDiCBgYmub/PYXnqUvUUNzJzHpwwT/11AS4NZyywx3BPZPebhzw+iT4dAEOyRfl2ZOBFjsPAblCCiqVAYiUZ+qoyiX1zR7ZQNMuSYOlmsZqwQr7Q1Z7GrM79qJiFZrYCR7nh+khN1aSpXN60= Received: by 10.35.41.14 with SMTP id t14mr7311603pyj; Sat, 26 Aug 2006 04:34:27 -0700 (PDT) Received: by 10.35.49.19 with HTTP; Sat, 26 Aug 2006 04:34:27 -0700 (PDT) Message-ID: <1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com> Date: Sat, 26 Aug 2006 13:34:27 +0200 From: "Guillaume Smet" To: "Bruce Momjian" Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol Cc: "Tom Lane" , "Oliver Jowett" , "Dave Cramer" , "Csaba Nagy" , "Postgres JDBC" , PostgreSQL-patches In-Reply-To: <200608070345.k773joq04056@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200608051739.k75Hd6D03844@momjian.us> <200608070345.k773joq04056@momjian.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/142 X-Sequence-Number: 15669 On 8/7/06, Bruce Momjian wrote: > Updated patch attached. It prints the text bind parameters on a single > detail line. I still have not seen portal names generated by libpq. I'm currently testing CVS tip to generate sample log files. I noticed that Bruce only patched log_statement and not log_min_duration_statement which still has the old behaviour ie: [1-1] LOG: duration: 0.097 ms execute my_query: SELECT * FROM shop WHERE name = $1 The problem of not having the bind parameters still remains. A lot of people use log_min_duration_statement and it's usually recommended to use it instead of log_statement because log_statement generates far too much output. I tried to find a way to fix it but it's not so simple as when we bind the statement, we don't know if the query will be slower than log_min_duration_statement. My first idea is that we should add a DETAIL line with the parameter values to the execute log line when we are in the log_min_duration_statement case. AFAICS the values are in the portal but I don't know the overhead introduced by generating the detail line from the portal. Does anyone have a better idea on how we could fix it? Regards, -- Guillaume