<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
The problem I was having "went away" when I moved to another Solaris 2.6
machine with the latest patch level.
<br>I've also tested it on Solaris 8, HP-UX 11.00 and Linux, so it looks
like there is a connect bug in a release 2.6,
<br>but seems to be fixed with later patches.
<p>Thanks for the help.
<p>Tom Lane wrote:
<blockquote TYPE=CITE>Joe Murphy <joe(dot)murphy(at)aersoft(dot)ie> writes:
<br>>> The re-connect underlying call to connect returns -1 and errno =
<br>>> it thinks the connection is "in progress" and tries
<br>>> to complete the connection - but hangs on the select (poll)
<p>Well, you have a bug in connect() if it's returning the wrong errno
<br>in the multi-thread case.
<p>However, our code in fe-connect.c reads like this:
<p> if (connect(conn->sock, &conn->raddr.sa, conn->raddr_len)
<br> if (SOCK_ERRNO == EINTR)
/* Interrupted system call - we'll just try again */
<p> if (SOCK_ERRNO == EINPROGRESS
|| SOCK_ERRNO == EWOULDBLOCK || SOCK_ERRNO == 0)
* This is fine - we're in non-blocking mode, and the
* connection is in progress.
conn->status = CONNECTION_STARTED;
/* Something's gone wrong */
<p>I wonder whether it's really a good idea to treat errno == 0 as
<br>indicating "connection in progress". Does anyone know of a platform
<br>where zero is actually what is returned in this case? The man
<br>I can find all say that EINPROGRESS is returned.
regards, tom lane
<p>---------------------------(end of broadcast)---------------------------
<br>TIP 4: Don't 'kill -9' the postmaster</blockquote>
Joe Murphy - AerSoft Limited
2 Northumberland Avenue, Dun Laoghaire, Co. Dublin.
phone: +353-1-2301166 direct: +353-1-2145953 fax: +353-1-2301167
<A HREF="mailto:joe(at)aersoft(dot)com">mailto:joe(at)aersoft(dot)com</A> mobile: +353-86-8526181 <A HREF="http://www.aersoft.com">http://www.aersoft.com</A>
In response to
pgsql-interfaces by date
|Next:||From: Gerhard Häring||Date: 2002-09-08 17:35:49|
|Subject: [ANN] pyPgSQL 2.2 is released|
|Previous:||From: Rene Kiessig||Date: 2002-09-06 10:08:10|
|Subject: Views in pgaccess|