Thread: PostgreSQL 8.0 can't print duration in log when client uses 8.0 jdbc driver

PostgreSQL 8.0 can't print duration in log when client uses 8.0 jdbc driver

From
Ryszard Lach
Date:
Hi.

I noticed, that PostgreSQL cannot print statement duration when a Java
client is using JDBC driver (I've tested with JDK1.4.2 and JDBC-2 and
JDBC-3 postgresql8 drivers). Changing driver to 7.4 (JDBC-3) solves the
problem. Strange, isn't it?

Richard.

--
"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.

Re: PostgreSQL 8.0 can't print duration in log when client

From
Oliver Jowett
Date:
Ryszard Lach wrote:

> I noticed, that PostgreSQL cannot print statement duration when a Java
> client is using JDBC driver (I've tested with JDK1.4.2 and JDBC-2 and
> JDBC-3 postgresql8 drivers). Changing driver to 7.4 (JDBC-3) solves the
> problem. Strange, isn't it?

This is likely to be because the newer driver uses the extended-query
protocol. Current backends don't handle logging of the extended-query
protocol very well, I guess that statement duration logging is another
manifestation of this.

-O