Skip site navigation (1) Skip section navigation (2)

Re: Brittleness in regression test setup

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Brittleness in regression test setup
Date: 2008-11-27 10:31:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Peter Eisentraut wrote:
> 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.

Well, duh, the checking is actually pretty simple.  We just try to 
connect with psql to the candidate port number before starting our own 
postmaster and see if anyone is already there.

Patch attached.  It solves my immediate problems nicely.

Attachment: pgregress-port-number.diff
Description: text/plain (6.2 KB)

In response to


pgsql-hackers by date

Next:From: Rob KirkbrideDate: 2008-11-27 11:29:10
Subject: Re: Enhancement to pg_dump
Previous:From: Peter EisentrautDate: 2008-11-27 09:37:48
Subject: Re: Thread safety

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group