[unixODBC-dev] Bug in Postgres7.1 driver?

Constantine Filin cfilin at intermedia.net
Wed Nov 23 03:03:07 GMT 2005


Greetings -

I have unixODBC version 2.2.9 with Postgres7.1 driver. Postgres version
is 8.0.1 running on Linux Fedora 2.

When UnixODBC calls SQLDriverConnect() and from there CC_connect()
function, unix odbc after a successful socket connection sends an empty
query to the backend. That query sometimes fails despite the fact that
the postgres process has successfully started on the backend (this is
also an issue but not the bug I am reporting) 

When the empty query fails Postgres7.1 ODBC driver reports "The database
does not exist on the server or user authentication failed." and returns
an error to the caller. 

The problem is that in such case ODBC driver does not close the SOCKET
going to the postgres backend and that socket remains STALE in the
process without any reference to it and no way to close it. It can be
seen in lsof command output. The postgres server - meanwhile - keep the
postgres process running for the connection until I send it a SIGTERM
signal.

How do I go about fixing it?

Thanks

-c




More information about the unixODBC-dev mailing list