Re: Brittleness in regression test setup - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Brittleness in regression test setup
Date
Msg-id 492D3B09.3020604@gmx.net
Whole thread Raw
In response to Re: Brittleness in regression test setup  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Brittleness in regression test setup  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Brittleness in regression test setup  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Alvaro Herrera wrote:
> Is it possible to make it retry in case the chosen port is busy?  I
> guess a simple check should suffice, ignoring the obvious race condition
> that someone uses the port after you checked it was OK.

Well, the whole point of this exercise was to avoid that.  If we had a 
way to do a "simple check", we might as well stick to the hardcoded port 
and count up from that or something.

The problem with doing the checking is that you have to emulate the 
complete postmaster logic for port numbers, listen addresses, Unix 
domain socket directories, etc.  That can become quite involved.

Then again, a simple way to avoid the issue altogether on platforms 
supporting Unix-domain sockets would be to run the test over Unix-domain 
sockets (which we do anyway) placed in a private directory.  How about that?


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Brittleness in regression test setup
Next
From: Peter Eisentraut
Date:
Subject: Re: Brittleness in regression test setup