>> I think the race condition you mentioned refers to the inconsistency
>> between the inHeap flag and the pairing heap caused by a race
>> condition between timeout and wakeup (or perhaps other combinations?
>> I'm not sure which version of the patch the mentioned race condition
>> refers to). However, I imagine it is difficult to reliably reproduce
>> this condition. In that regard, in the latest patch, the coherence
>> between the inHeap flag and the pairing heap is protected by LWLock,
>> so I believe we no longer need that test.
>
> No, Alexandre means that Heikki point on race condition just before
> LWLock. But injection point we can inject and stepin on backend, and
> WaitLSNSetLatches is used from Recovery process. But I have trouble
> to wakeup injection point on server.
One more thing. I want to point, when you move injection point to
contrib dir and do the same test (044_wal_replay_wait_injection_test.pl)
step by step with hands, wakeup works well.
--
Ivan Kartyshov
Postgres Professional: www.postgrespro.com