Re: Test of a partition with an incomplete detach has a timing issue - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Test of a partition with an incomplete detach has a timing issue
Date
Msg-id 20210525170022.GA17011@alvherre.pgsql
Whole thread Raw
In response to Re: Test of a partition with an incomplete detach has a timing issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2021-May-25, Tom Lane wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > The problem disappears completely if I add a sleep to the cancel query:
> > step "s1cancel"     { SELECT pg_cancel_backend(pid), pg_sleep(0.01) FROM d3_pid; }
> > I suppose a 0.01 second sleep is not going to be sufficient to close the
> > problem in slower animals, but I hesitate to propose a much longer sleep
> > because this test has 18 permutations so even a one second sleep adds
> > quite a lot of (mostly useless) test runtime.
> 
> Yeah ... maybe 0.1 second is the right tradeoff?

Pushed with a 0.1 sleep, and some commentary.

> Note that on slow (like CCA) animals, the extra query required by
> Noah's suggestion is likely to take more than 0.1 second.

Hmm, but the sleep is to compete with the cancelling of detach, not with
the noop query.

I tried running the test under CCA here and it didn't fail, but of
course that's not a guarantee of anything since it only completed one
iteration.

-- 
Álvaro Herrera       Valdivia, Chile



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: storing an explicit nonce
Next
From: Ranier Vilela
Date:
Subject: Re: Possible pointer var TupleDesc rettupdesc used not initialized (src/backend/optimizer/util/clauses.c)