Re: Cygwin PostgreSQL Regression Test Problems (Revisited) - Mailing list pgsql-ports

From Tom Lane
Subject Re: Cygwin PostgreSQL Regression Test Problems (Revisited)
Date
Msg-id 22626.985884008@sss.pgh.pa.us
Whole thread Raw
In response to Cygwin PostgreSQL Regression Test Problems (Revisited)  (Jason Tishler <Jason.Tishler@dothill.com>)
Responses Re: Cygwin PostgreSQL Regression Test Problems (Revisited)
List pgsql-ports
Jason Tishler <Jason.Tishler@dothill.com> writes:
>   status = CONNECTION_STARTED, asyncStatus = PGASYNC_IDLE,

Oh-ho, that's interesting!  If you look at fe-connect.c you'll see that
CONNECTION_STARTED must indicate that connect() returned EINPROGRESS
rather than a success indication.  The socket is supposed to go
write-ready when the connection is finished --- for example HPUX's
connect man page sez

          [EINPROGRESS]            Nonblocking I/O is enabled using
                                   O_NONBLOCK, O_NDELAY, or FIOSNBIO, and
                                   the connection cannot be completed
                                   immediately.  This is not a failure.
                                   Make the connect() call again a few
                                   seconds later.  Alternatively, wait for
                                   completion by calling select() and
                                   selecting for write.

But, evidently, it never is coming ready for write.

BTW, I note that we are trying to use Unix sockets here.  Does the bug
still appear if you force pg_regress to use TCP connections?

            regards, tom lane

pgsql-ports by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cygwin PostgreSQL Regression Test Problems (Revisited)
Next
From: Jason Tishler
Date:
Subject: Re: Cygwin PostgreSQL Regression Test Problems (Revisited)