Re: Adding CI to our tree

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Adding CI to our tree
Дата
Msg-id 20220119202926.nwbu5zfjts5qxbl4@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Adding CI to our tree  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Adding CI to our tree  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2022-01-19 15:05:44 -0500, Tom Lane wrote:
> And the cause of that is obvious: Cluster::start thinks that if "pg_ctl
> start" failed, there couldn't possibly be a postmaster running.  So it
> doesn't bother to update self->_pid, and then the END hook thinks there is
> nothing to do.

Ah, right.

I'm doubtful that it's good that we use BAIL_OUT so liberally, because it
prevents further tests from running (i.e. if 001 bails, 002+ doesn't run),
which doesn't generally seem like the right thing to do after a single test
fails. But that's really independent of the fix you make here.


> The attached simple fix gets rid of this problem.  Any objections?

Nope, sounds like a plan.

> diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
> index 7af0f8db13..fd0738d12d 100644
> --- a/src/test/perl/PostgreSQL/Test/Cluster.pm
> +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
> @@ -845,6 +845,11 @@ sub start
>      {
>          print "# pg_ctl start failed; logfile:\n";
>          print PostgreSQL::Test::Utils::slurp_file($self->logfile);
> +
> +        # pg_ctl could have timed out, so check to see if there's a pid file;
> +        # without this, we fail to shut down the new postmaster later.
> +        $self->_update_pid(-1);

I'd maybe do s/later/in the END block/ or such, so that one knows where to
look. Took me a minute to find it again.

Greetings,

Andres Freund



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15
Следующее
От: David Rowley
Дата:
Сообщение: Re: Fix BUG #17335: Duplicate result rows in Gather node