pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Splivalo <mario.splivalo@mobart.hr>
To: pgsql-jdbc@postgresql.org
Subject: Log files cluttered with jdbc3/4 for pg8.2
Date: Wed, 20 Jun 2007 14:44:32 +0200
Message-ID: <1182343472.12993.7.camel@localhost.localdomain> (raw)

I was nagging couple of months earlier about postgres not logging
function parameteres. Now we're planing on switching to pg8.2, so I'm
doing some tests to see how it all works.

I'm using postgres 8.2.4 with postgresql-8.2-505.jdbc3. I'm calling a
simple function from Java, here is the Java code:

CallableStatement cs = conn.prepareCall("{? = call f1(ROW(?,?))}");
cs.registerOutParameter(1, Types.INTEGER);
cs.setInt(2,2);
cs.setInt(3,3);
cs.execute();

Now, this is how the postgres log file looks like:

2007-06-20 11:26:11.870 CEST [3990] <>  DEBUG:  forked new backend,
pid=12137 socket=6
2007-06-20 11:26:11.935 CEST [12137] <test1> PARSE DEBUG:  parse
<unnamed>: select * from f1($1,ROW($2,$3)) as result
2007-06-20 11:26:11.936 CEST [12137] <test1> PARSE LOG:  duration: 0.928
ms  parse <unnamed>: select * from f1($1,ROW($2,$3)) as result
2007-06-20 11:26:11.936 CEST [12137] <test1> PARSE DEBUG:  bind
<unnamed> to <unnamed>
2007-06-20 11:26:11.936 CEST [12137] <test1> BIND LOG:  duration: 0.171
ms  bind <unnamed>: select * from f1($1,ROW($2,$3)) as result
2007-06-20 11:26:11.936 CEST [12137] <test1> BIND DETAIL:  parameters:
$1 = '', $2 = '2', $3 = '3'
2007-06-20 11:26:11.936 CEST [12137] <test1> SELECT LOG:  duration:
0.036 ms  execute <unnamed>: select * from f1($1,ROW($2,$3)) as result
2007-06-20 11:26:11.936 CEST [12137] <test1> SELECT DETAIL:  parameters:
$1 = '', $2 = '2', $3 = '3'
2007-06-20 11:26:12.057 CEST [12137] <test1> idle LOG:  unexpected EOF
on client connection
2007-06-20 11:26:12.058 CEST [3990] <>  DEBUG:  server process (PID
12137) exited with exit code 0


I finaly see the actuall parametars the function was called with, but, I
have too much lines for a simple SELECT. Is there a way to turn off
PARSE/BIND log entries, so I can have just the SELECTs? I tried tweaking
postgresql.conf, everything I do produces no changes?

The same happens with JDBC driver for pg8.1. If I use JDBC driver for
pg7.4 then I have 'normal' log (presumeably because I don't have
prepared statements from within JDBC driver for 7.4).

And, if someone knows, why is it that I have SELECT LOG and SELECT
DETAIL entry?

	Mario




view thread (6+ messages)  latest in thread

Message-ID: <1182343472.12993.7.camel@localhost.localdomain>
Permalink:  ../1182343472.12993.7.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1182343472.12993.7.camel@localhost.localdomain

 · 

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: mario.splivalo@mobart.hr
  Subject: Re: Log files cluttered with jdbc3/4 for pg8.2
  In-Reply-To: <1182343472.12993.7.camel@localhost.localdomain>
  References: <1182343472.12993.7.camel@localhost.localdomain>

* 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