Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] [PATCHES] log_statement output for protocol

From: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Oliver Jowett" <oliver(at)opencloud(dot)com>, "Dave Cramer" <pg(at)fastcrypt(dot)com>, "Csaba Nagy" <nagy(at)ecircle-ag(dot)com>, "Postgres JDBC" <pgsql-jdbc(at)postgresql(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
Date: 2006-08-26 11:34:27
Message-ID: 1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbcpgsql-patches
On 8/7/06, Bruce Momjian <bruce(at)momjian(dot)us> 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

In response to

Responses

pgsql-hackers by date

Next:From: Jonah H. HarrisDate: 2006-08-26 12:35:10
Subject: Re: Adding fulldisjunctions to the contrib
Previous:From: Nikolay SamokhvalovDate: 2006-08-26 08:00:35
Subject: Re: New XML section for documentation

pgsql-patches by date

Next:From: Jonah H. HarrisDate: 2006-08-26 12:35:10
Subject: Re: Adding fulldisjunctions to the contrib
Previous:From: Zoltan BoszormenyiDate: 2006-08-26 04:42:24
Subject: Re: IDENTITY/GENERATED columns

pgsql-jdbc by date

Next:From: Julien PatrouixDate: 2006-08-28 07:35:22
Subject: Optimizations in the latest driver
Previous:From: Oliver JowettDate: 2006-08-25 21:33:21
Subject: Re: XA Resources

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group