Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-25 Thread Tom Lane
I wrote: > Michael Paquier writes: >> Not worse, and still not enough... bowerbird complained again: >> http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird=2016-04-25%2002%3A13%3A54 > That's a different symptom that seems unrelated: > cannot remove

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-24 Thread Tom Lane
Michael Paquier writes: > Not worse, and still not enough... bowerbird complained again: > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird=2016-04-25%2002%3A13%3A54 That's a different symptom that seems unrelated: cannot remove directory for

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-24 Thread Michael Paquier
On Mon, Apr 25, 2016 at 4:43 AM, Tom Lane wrote: > I took a second look at the above-quoted Microsoft documentation, and > noticed that it specifies that this error occurs when another application > is *bound* to the target address. If by that they mean that the other > app

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-24 Thread Tom Lane
I wrote: > However, it's still not entirely clear what is the root cause of the > failure and whether a patch along the discussed lines would prevent its > recurrence. Looking at TranslateSocketError, it seems we must be seeing > an underlying error code of WSAEACCES. A little googling says that

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-22 Thread Michael Paquier
On Thu, Apr 21, 2016 at 11:46 PM, Tom Lane wrote: > I wrote: >> Michael Paquier writes: >>> And this gives the patch attached, just took the time to hack it. > >> I think this is a good idea, but (1) I'm inclined not to restrict it to >> Windows,

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-21 Thread Tom Lane
I wrote: > Michael Paquier writes: >> And this gives the patch attached, just took the time to hack it. > I think this is a good idea, but (1) I'm inclined not to restrict it to > Windows, and (2) I think we should hold off applying it until we've seen > a failure or

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-14 Thread Michael Paquier
On Fri, Apr 15, 2016 at 12:13 AM, Tom Lane wrote: > Michael Paquier writes: >> On Thu, Apr 14, 2016 at 9:38 AM, Michael Paquier >> wrote: >>> IO::Socket::INET is another option, but I am not seeing it in perl < >>> 5.12,

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-14 Thread Tom Lane
Michael Paquier writes: > On Thu, Apr 14, 2016 at 9:38 AM, Michael Paquier > wrote: >> IO::Socket::INET is another option, but I am not seeing it in perl < >> 5.12, and that's not part of ActivePerl, which makes life harder on >> Windows.

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-14 Thread Michael Paquier
On Thu, Apr 14, 2016 at 9:38 AM, Michael Paquier wrote: > IO::Socket::INET is another option, but I am not seeing it in perl < > 5.12, and that's not part of ActivePerl, which makes life harder on > Windows. Socket is available on both. Does that address your concerns?

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-13 Thread Michael Paquier
On Thu, Apr 14, 2016 at 8:46 AM, Tom Lane wrote: > Alvaro Herrera writes: >> Michael Paquier wrote: >>> Well, yes. That's true, we could do without. Even if this could give >>> an indication about a node running, as long as a port has been >>>

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-13 Thread Tom Lane
Alvaro Herrera writes: > Michael Paquier wrote: >> Well, yes. That's true, we could do without. Even if this could give >> an indication about a node running, as long as a port has been >> associated to a node once, we just need to be sure that a new port is >> not

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-13 Thread Alvaro Herrera
Michael Paquier wrote: > On Wed, Apr 13, 2016 at 10:33 PM, Tom Lane wrote: > > Michael Paquier writes: > >> On Wed, Apr 13, 2016 at 9:06 AM, Tom Lane wrote: > >>> If there's other stuff using high ports on a particular buildfarm

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-13 Thread Michael Paquier
On Wed, Apr 13, 2016 at 10:33 PM, Tom Lane wrote: > Michael Paquier writes: >> On Wed, Apr 13, 2016 at 9:06 AM, Tom Lane wrote: >>> If there's other stuff using high ports on a particular buildfarm machine, >>> you'd expect

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-13 Thread Tom Lane
Michael Paquier writes: > On Wed, Apr 13, 2016 at 9:06 AM, Tom Lane wrote: >> If there's other stuff using high ports on a particular buildfarm machine, >> you'd expect occasional random test failures due to this. The observed >> fact that some

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-13 Thread Michael Paquier
On Wed, Apr 13, 2016 at 9:06 AM, Tom Lane wrote: > While we wait to see if that actually helps give useful errors, > I had a thought about what may be happening here. PostgresNode.pm > picks a random high port number and tests to see if it's free using > pg_isready, with

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-12 Thread Tom Lane
Magnus Hagander writes: > On Mon, Jan 11, 2016 at 6:19 AM, Amit Kapila > wrote: >> On Sun, Jan 10, 2016 at 11:55 PM, Tom Lane wrote: >>> I think the reason why we're getting "No error" instead of a useful >>> strerror report is

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-01-11 Thread Magnus Hagander
On Mon, Jan 11, 2016 at 6:19 AM, Amit Kapila wrote: > On Sun, Jan 10, 2016 at 11:55 PM, Tom Lane wrote: > > > > Some of the Windows buildfarm members occasionally fail like this: > > > > LOG: could not bind IPv4 socket: No error > > HINT: Is

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-01-10 Thread Amit Kapila
On Sun, Jan 10, 2016 at 11:55 PM, Tom Lane wrote: > > Some of the Windows buildfarm members occasionally fail like this: > > LOG: could not bind IPv4 socket: No error > HINT: Is another postmaster already running on port 64470? If not, wait a few seconds and retry. >

[HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-01-10 Thread Tom Lane
Some of the Windows buildfarm members occasionally fail like this: LOG: could not bind IPv4 socket: No error HINT: Is another postmaster already running on port 64470? If not, wait a few seconds and retry. WARNING: could not create listen socket for "127.0.0.1" FATAL: could not create any