Home > Archive > PostgreSQL JDBC > December 2005 > Re: an efficient way of checking if the connection to a db









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: an efficient way of checking if the connection to a db
Kris Jurka

2005-12-15, 8:25 pm



On Thu, 15 Dec 2005, Tom Lane wrote:

> I think you've got a problem on the driver side.
> Here, strace'ing a program doing PQexec(conn, "") shows:
>
> 17:53:33.677241 send(3, "Q\0\0\0\5\0", 6, 0) = 6
> ...
> 17:53:33.678085 recv(3, "I\0\0\0\4Z\0\0\0\5I", 16384, 0) = 11
>
> which looks like EmptyQueryResponse followed by ReadyForQuery to me.


This was indeed a driver problem. With V2 protocol EmptyQuery is followed
by a single null byte, but the driver was expecting a four byte message
length, like the V3 protocol sends.

Fixed in 8.0, 8.1, and head.

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com