X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7ACC28B9E3D for ; Mon, 7 Feb 2005 16:21:39 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80771-06 for ; Mon, 7 Feb 2005 16:21:29 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 509758B9B39 for ; Mon, 7 Feb 2005 16:21:28 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j17GLS1P027478; Mon, 7 Feb 2005 11:21:28 -0500 (EST) To: Chad Robinson Cc: pgsql-interfaces@postgresql.org Subject: Re: Problem with asynchronous connect in 8.0.1 In-reply-to: <20050207150504.14253.qmail@web11608.mail.yahoo.com> References: <20050207150504.14253.qmail@web11608.mail.yahoo.com> Comments: In-reply-to Chad Robinson message dated "Mon, 07 Feb 2005 07:05:04 -0800" Date: Mon, 07 Feb 2005 11:21:27 -0500 Message-ID: <27477.1107793287@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/16 X-Sequence-Number: 5261 Chad Robinson writes: > I'm having a problem with asynchronous connections, and I can't seem to find > a good example of this anywhere. To make things simple, I've reduced my > program to the bare minimums, not even using select(). I believe that the async I/O code expects you to obey the API protocol, in particular to wait for read-ready or write-ready where it says to. Offhand I would expect an error return in case of failure to wait long enough, though. > In my Postgres logs I see: > LOG: incomplete startup packet Hmm, is it possible pqFlush never succeeded in writing out the whole startup packet? It'd be useful to look at the state of the connection object with a debugger, esp. to see if anything is still pending in the outbound I/O buffer. regards, tom lane