Skip site navigation (1) Skip section navigation (2)

Re: Problem with asynchronous connect in 8.0.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chad Robinson <taskswap(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Problem with asynchronous connect in 8.0.1
Date: 2005-02-07 16:21:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Chad Robinson <taskswap(at)yahoo(dot)com> 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

In response to


pgsql-interfaces by date

Next:From: Jim MorcombeDate: 2005-02-08 03:08:19
Subject: A problem with libpq
Previous:From: Chad RobinsonDate: 2005-02-07 15:05:04
Subject: Problem with asynchronous connect in 8.0.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group