Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection

From: Gerhard Hintermayer <g(dot)hintermayer(at)inode(dot)at>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection
Date: 2002-09-02 16:34:53
Message-ID: kt30la.c9q.ln@schere.mfa.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Tom Lane wrote:
> g(dot)hintermayer(at)inode(dot)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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2002-09-02 23:45:28 Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection
Previous Message Tom Lane 2002-09-02 15:54:08 Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection