Re: Race conditions with TAP test for syncrep

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Race conditions with TAP test for syncrep
Дата
Msg-id 20190618005908.GB1744@paquier.xyz
обсуждение исходный текст
Ответ на Re: Race conditions with TAP test for syncrep  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Race conditions with TAP test for syncrep  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Race conditions with TAP test for syncrep  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On Mon, Jun 17, 2019 at 10:50:39AM -0400, Alvaro Herrera wrote:
> Hmm, this introduces a bit of latency: it waits for each standby to be
> fully up before initializing the next standby.  Maybe it would be more
> convenient to split the primitives: keep the current one to start the
> standby, and add a separate one to wait for it to be registered.  Then
> we could do
> standby1->start;
> standby2->start;
> standby3->start;
> foreach my $sby (@standbys) {
>     $sby->wait_for_standby
> }

It seems to me that this sequence could still lead to inconsistencies:
1) standby 1 starts, reaches consistency so pg_ctl start -w exits.
2) standby 2 starts, reaches consistency.
3) standby 2 starts a WAL receiver, gets the first WAL sender slot of
the primary.
4) standby 1 starts a WAL receiver, gets the second slot.

> I think this should be note() rather than print(), or maybe diag().  (I
> see that we have a couple of other cases which use print() in the tap
> tests, which I think should be note() as well.)

OK.  Let's change it for this patch.  For the rest, I can always send
a different patch.  Just writing down your comment..
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Fix typos and inconsistencies for v11+
Следующее
От: Steve Singer
Дата:
Сообщение: Re: PG 12 beta 1 segfault during analyze