Dear List,

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 4: Don't 'kill -9' the postmaster

Reply via email to