pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Smet <guillaume.smet@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Csaba Nagy <nagy@ecircle-ag.com>
Cc: Postgres JDBC <pgsql-jdbc@postgresql.org>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
Date: Sat, 26 Aug 2006 13:34:27 +0200
Message-ID: <1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com> (raw)
In-Reply-To: <200608070345.k773joq04056@momjian.us>
References: <200608051739.k75Hd6D03844@momjian.us>
	<200608070345.k773joq04056@momjian.us>

On 8/7/06, Bruce Momjian <bruce@momjian.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



view thread (21+ messages)  latest in thread

Message-ID: <1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com>
Permalink:  ../1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com/
Also on:    postgresql.org/message-id/1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: guillaume.smet@gmail.com, bruce@momjian.us, tgl@sss.pgh.pa.us, oliver@opencloud.com, pg@fastcrypt.com, nagy@ecircle-ag.com, pgsql-patches@postgresql.org
  Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol
  In-Reply-To: <1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com>
  References: <200608051739.k75Hd6D03844@momjian.us> <200608070345.k773joq04056@momjian.us> <1d4e0c10608260434h4940da5anf96c1e48b8e1d151@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox