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 CAB7nPqSZ=YZJeW7m73m+03faPvwykRaQ13fkTOJaV8sym+us_A@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 10:48 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> $node_standby_1->poll_query_until('postgres', q[SELECT xmin IS NULL
> from pg_replication_slots WHERE slot_name = '] . $slotname_2 . q[']);

+1 for avoiding a sleep call if it is not necessary. Fast platforms
would always pay a cost on that, and slow platforms would wait 1s (or
more!) when polling for the result.

Could it be possible to remove as well the second sleep(2) call in
this test please? This could be replaced by a similar poll using the
query Craig has just given as this needs to wait until the xmon is
cleared. Other tests expect a value so this poll cannot happen in
get_slot_xmins.
-- 
Michael



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: [HACKERS] Corner-case error in pgstats file loading
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Timing-sensitive case in src/test/recovery TAP tests