Re: New instability in stats regression test

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: New instability in stats regression test
Дата
Msg-id 3893718.1701111711@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: New instability in stats regression test  (Andres Freund <andres@anarazel.de>)
Ответы Re: New instability in stats regression test
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I am probably under-caffeinated: What precisely is the potential race? Just
> that the timestamps on some system might not be granular enough?

The problem as I see it is that this test:

SELECT :io_stats_post_reset < :io_stats_pre_reset;

requires an assumption that less I/O has happened since the commanded
reset action than happened before it (extending back to the previous
reset, or cluster start).  Since concurrent processes might be doing
I/O, this has a race condition.  If we are slow enough about obtaining
:io_stats_post_reset, the test *will* fail eventually.  But the shorter
the distance back to the previous reset, the bigger the odds of
observable trouble; thus Michael's concern that adding more reset
tests in future would increase the risk of failure.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Add recovery to pg_control and remove backup_label
Следующее
От: Robert Haas
Дата:
Сообщение: Re: trying again to get incremental backup