Re: New instability in stats regression test - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New instability in stats regression test
Date
Msg-id 3893718.1701111711@sss.pgh.pa.us
Whole thread Raw
In response to Re: New instability in stats regression test  (Andres Freund <andres@anarazel.de>)
Responses Re: New instability in stats regression test
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: Add recovery to pg_control and remove backup_label
Next
From: Robert Haas
Date:
Subject: Re: trying again to get incremental backup