Re: Regression tests versus the buildfarm environment

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regression tests versus the buildfarm environment
Дата
Msg-id 4266.1281534907@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Regression tests versus the buildfarm environment  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: Regression tests versus the buildfarm environment  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Regression tests versus the buildfarm environment  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> A look at the code shows that it is merely trying to run psql, and
>> if psql reports that it can connect to the specified port, then
>> pg_regress thinks the postmaster started OK.  Of course, psql was
>> really reporting that it could connect to the other instance's
>> postmaster.
> Clearly picking unique ports for `make check` is the ultimate
> solution, but I'm curious whether this would have been caught sooner
> with less effort if the pg_ctl TODO titled "Have the postmaster
> write a random number to a file on startup that pg_ctl checks
> against the contents of a pg_ping response on its initial connection
> (without login)" had been implemented.

It would certainly make the failure more transparent.  As I mentioned,
there are previous buildfarm failures that look like they might be
caused by a similar conflict, but it's seldom possible to be sure.
A cross-check like that would be much safer.

BTW, I don't know why anyone would think that "a random number" would
offer any advantage here.  I'd use the postmaster PID, which is
guaranteed to be unique across the space that you're worried about.
In fact, you could implement this off the existing postmaster.pid,
no need for any new file.  What's lacking is the pg_ping protocol.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Boszormenyi Zoltan
Дата:
Сообщение: Inconsistent ::bit(N) and get_bit()?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Regression tests versus the buildfarm environment