dbTalk Databases Forums  

[BUGS] PG7.4 / psqlodbc / log_duration=true & client_min_messages=log / Can't connect

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] PG7.4 / psqlodbc / log_duration=true & client_min_messages=log / Can't connect in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tim
 
Posts: n/a

Default [BUGS] PG7.4 / psqlodbc / log_duration=true & client_min_messages=log / Can't connect - 12-16-2003 , 02:49 PM






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 With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] PG7.4 / psqlodbc / log_duration=true & client_min_messages=log / Can't connect - 12-17-2003 , 12:25 PM






tim <twknowles (AT) uklinux (DOT) net> writes:
Quote:
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.
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

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.