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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why doesn't src/backend/port/win32/socket.c implement bind()?
Date: 2016-04-13 23:46:53
Message-ID: 13983.1460591213@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> 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 allocated. On Windows, I am not sure that it is worth the
>> complication to be honest, and the current code gives a small safety
>> net, which is better than nothing.

> If we need to fix the test so that it works in a wider environment for
> Windows, I don't think it makes sense to remove anything -- rather we
> should change the test as Tom suggests to verify that the port is really
> free rather than just doing the pg_isready test. Maybe the additional
> test will be useless in non-Windows environment, but why cares? It will
> work all the same.

I think Michael is arguing that it's not worth fixing. He might be right;
it's not like this is the only cause of irreproducible failures on the
Windows critters. Still, it bugs me if we know how to make the regression
tests more reliable and do not do so. Back when I packaged mysql for Red
Hat, I was constantly annoyed by how often their tests failed under load.
Don't want to be like that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-04-13 23:57:33 Re: SET ROLE and reserved roles
Previous Message David G. Johnston 2016-04-13 23:20:54 Re: [HACKERS] sign function with INTERVAL?