logo       
Google Custom Search
    AddThis Social Bookmark Button

Can't connect to DB using psqlodbc when log_duration=true & client_min_mess: msg#00068

Subject: Can't connect to DB using psqlodbc when log_duration=true & client_min_messages=log
Dear List,

I've been advised me to repost this bug report on this list by Tom Lane.  I've 
copied his comments below after which my original post is listed.

>Hm.  This sounds like psqlodbc is unprepared to handle a NOTICE message
>arriving during its startup; which if true would imply other corner-case
>bugs besides this one.

>I am not sure if any of the pgsql ODBC guys pay close attention to
>pgsql-bugs.  If you don't get any useful help, try reposting on the
>pgsql-odbc list.

>                       regards, tom lane

PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.1 (Mandrake 
Linux 9.2 3.3.1-2mdk)

psqlodbc versions: 07_03_0100 & 07_03_0200

I've found a minor bug whilst using psqlodbc to connect to PostgreSQL.  I have 
found that if you set in postgresql.conf:

client_min_messages=log 
log_duration=true

you are unable to connect to any db using the psqlodbc driver.  Crystal 
Reports for example advises 'ODBC error: Could not connect to the server;  
socket is already connected'.  psql and pgadmin3 work fine, although they are 
running on the same box as the server and under linux :).  Setting 
client_min_messages=info and restarting PostgreSQL allows everything to work 
fine again.  None of the other settings if set to true in the 'What to log' 
section seem to cause any problems. Below I have pasted a typical successful 
connection and an unsuccessful one as logged in syslog.


*** SUCCESSFUL CONNECTION ***

2003-12-16 20:08:19 [5579] LOG:  connection received: host=192.168.196.10 
port=1143
2003-12-16 20:08:19 [5579] LOG:  connection authorized: user=postgres 
database=pgbench
2003-12-16 20:08:19 [5579] LOG:  statement:
2003-12-16 20:08:19 [5579] LOG:  statement: select version()
2003-12-16 20:08:19 [5579] LOG:  statement: set DateStyle to 'ISO'
2003-12-16 20:08:19 [5579] LOG:  statement: set geqo to 'OFF'
2003-12-16 20:08:19 [5579] LOG:  statement: set extra_float_digits to 2
2003-12-16 20:08:19 [5579] LOG:  statement: select oid from pg_type where 
typname='lo'
2003-12-16 20:08:19 [5579] LOG:  statement: select pg_client_encoding()
2003-12-16 20:08:19 [5579] LOG:  statement: select relname, nspname, relkind 
from pg_catalog.pg_class, pg_catalog.pg_namespace where relkind in ('r', 'v') 
and relname !~ '^pg_|^dd_' and pg_namespace.oid = relnamespace order by 
nspname, relname


*** UNSUCCESSFUL CONNECTION ***

2003-12-16 20:10:47 [5709] LOG:  connection received: host=192.168.196.10 
port=1145
2003-12-16 20:10:47 [5709] LOG:  connection authorized: user=postgres 
database=pgbench
2003-12-16 20:10:47 [5709] LOG:  statement:
2003-12-16 20:10:47 [5709] LOG:  duration: 0.882 ms
2003-12-16 20:10:47 [5710] LOG:  connection received: host=192.168.196.10 
port=1146
2003-12-16 20:10:47 [5710] LOG:  connection authorized: user=postgres 
database=pgbench
2003-12-16 20:10:47 [5710] LOG:  statement:
2003-12-16 20:10:47 [5710] LOG:  duration: 0.856 ms

Client now complains that there is no server.



Best Regards,

Tim Knowles


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>