On Wed, Dec 20, 2017 at 9:05 AM, Andres Freund <and...@anarazel.de> wrote: > Indeed. I kinda wonder whether we hackishly solve this by simply > returning true fore all pids if it's waiting for a cleanup lock. That's > not actually that far from the truth... The big problem with that I see > is very short waits that resolve themselves causing issues - but given > that waiting for cleanup locks is really rare, that might not be too > bad.
I'm wondering if that might cause random, spurious failures. We go on to the next step if we detect that the current step is waiting... and the decisions we make about whether to do that cause differences in the output. >> <me thinks for a while> >> >> What if we add a hook to vacuum that lets you invoke some arbitrary C >> code after each block, and then write a test module that uses that >> hook to acquire and release an advisory lock at that point? Then you >> could do: > > I guess that'd work, albeit a bit invasive and specific to this > test. Trying to come up with a concept that'll be generizable longer > term would be neat. True, but I'm not sure there's much hope of that. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company