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

Lists: pgsql-jdbcpgsql-patches
From: Bruce Momjian <bruce(at)momjian(dot)us>
To: bruce(at)momjian(dot)us
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>, 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-29 02:33:30
Message-ID: 200608290233.k7T2XUu17676@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc pgsql-patches

bruce wrote:
> BTom Lane wrote:
> > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > Yes, I do. I have applied the attached patch to fix this issue and
> > > several others. The fix was to save the bind parameters in the portal,
> > > and display those in the executor output, if available.
> >
> > I have a feeling you just blew away the 4% savings in psql I've spent
> > the evening on. What's the overhead of this patch?
>
> The only overhead I see is calling log_after_parse() all the time,
> rather than only when log_statement is all. I could fix it by checking
> log_statement and log_min_duration_statement >= 0. Does
> log_after_parse() look heavy to you?

OK, I applied this patch to call log_after_parse() only if necessary.
The 'if' statement looked pretty ugly, so the optimization seemed
overkill, but maybe it will be useful.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/bjm/diff text/x-diff 994 bytes

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-29 11:22:58
Message-ID: 1d4e0c10608290422u35983861nd2d67793fda28f7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc pgsql-patches

Bruce,

I made a few tests here and the backend terminates with a SIG11 when a
parameter has the NULL value (it was logged as "(null)" before). I
suspect the new code broke something (perhaps it's due to the
escaping).

--
Guillaume