Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection - Mailing list pgsql-interfaces

From Gerhard Hintermayer
Subject Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection
Date
Msg-id kt30la.c9q.ln@schere.mfa.at
Whole thread Raw
In response to Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection
List pgsql-interfaces
Tom Lane wrote:
> g.hintermayer@inode.at (Gerhard Hintermayer) writes:
> 
>>I constantly keep getting this message in the log files when
>>disconnection with pg_disconnect (TCL-interface)
> 
> 
> Yeah, I see it too --- though everything's fine if you just exit the
> client program without an explicit pg_disconnect.  I think the problem
> is that pg_disconnect shouldn't be unregistering the notifier_channel;
> I bet TCL thinks it should close the socket when we do that.  Then
> the later PQfinish call will be unable to send the normal termination
> message to the backend.  Probably the best fix is to move the unregister
> call into PgDelConnectionId(), after we do PQfinish.
> 
>             regards, tom lane

Hope my posting works.

I don't understand what you're thinking of, because the unregistering triggers 
the call to PgDelConnectionId, so who will close the connection if you remove 
the unregister call ?
I wonder what has changed either in the Tcl or the PQ internals, since this 
worked in Tcl8.3.2 combined with PostgreSQL 7.0.2. Going to check that tomorrow 
at work.
Btw, is the PQfinish syncroneous (?) or not ? Maybe the problem is we're sending 
the X and close the connection immediately instead of letting the server close it.

Gerhard

-- 
Gerhard Hintermayer
http://www.inode.at/g.hintermayer



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection
Next
From: Tom Lane
Date:
Subject: Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection