Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DE455476061 for ; Mon, 2 Sep 2002 12:34:54 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 73222476060 for ; Mon, 2 Sep 2002 12:34:54 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id DF654381BD9; Mon, 2 Sep 2002 12:34:52 -0400 (EDT) From: Gerhard Hintermayer X-Newsgroups: comp.databases.postgresql.interfaces Subject: Re: libpgtcl: pq_recvbuf: unexpected EOF on client connection Date: Mon, 02 Sep 2002 18:34:53 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 34 Message-ID: References: <23187.1030982048@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: news@hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en To: pgsql-interfaces@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/4 X-Sequence-Number: 3065 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