Log files cluttered with jdbc3/4 for pg8.2

From: Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Log files cluttered with jdbc3/4 for pg8.2
Date: 2007-06-20 12:44:32
Message-ID: 1182343472.12993.7.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2007-06-20 15:16:29 Re: Log files cluttered with jdbc3/4 for pg8.2
Previous Message Albe Laurenz 2007-06-20 12:01:11 Re: SSL support for javax.sql.DataSource