Re: [HACKERS] Timing-sensitive case in src/test/recovery TAP tests

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Timing-sensitive case in src/test/recovery TAP tests
Дата
Msg-id CAB7nPqRapQBG8BSUR=UkShJDXCyPYD+GcBNmgSzu4Lw==UzAeQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Timing-sensitive case in src/test/recovery TAP tests  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: [HACKERS] Timing-sensitive case in src/test/recovery TAP tests  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Jun 26, 2017 at 12:12 PM, Craig Ringer <craig@2ndquadrant.com> wrote:
> On 26 June 2017 at 11:06, Michael Paquier <michael.paquier@gmail.com> wrote:
>
>> As long as we are on it, there is this code block in the test:
>> my ($xmin, $catalog_xmin) = get_slot_xmins($node_master, $slotname_1);
>> is($xmin,         '', 'non-cascaded slot xmin null with no hs_feedback');
>> is($catalog_xmin, '', 'non-cascaded slot xmin null with no hs_feedback');
>>
>> ($xmin, $catalog_xmin) = get_slot_xmins($node_standby_1, $slotname_2);
>> is($xmin,         '', 'cascaded slot xmin null with no hs_feedback');
>> is($catalog_xmin, '', 'cascaded slot xmin null with no hs_feedback');
>>
>> This should be more verbose as the 2nd and 4th test should say
>> "catalog xmin" instead of xmin.
>
> Agree, should. Mind posting a revision?

Sure.

>> Also, wouldn't it be better to poll as well node_standby_1's
>> pg_replication_slot on slotname_2? It would really seem better to make
>> the nullness check conditional in get_slot_xmins instead. Sorry for
>> changing opinion here.
>
> I'm not sure I understand this.

The patch attached may explain that better. Your patch added 3 poll
phases. I think that a 4th is needed. At the same time I have found
cleaner to put the poll calls into a small wrapper.
-- 
Michael

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] Code quality issues in ICU patch
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Reducing pg_ctl's reaction time