> On 28 Jan 2024, at 17:49, Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote:
> 
> I'd appreciate it if you or Horiguchi-san can update his patch to remove
> use of usleep in favor of a CV in multixact, and keep this CF entry to
> cover it.

Sure! Sounds great!

> Perhaps a test to make the code reach the usleep(1000) can be written
> using injection points (49cd2b93d7db)?

I've tried to prototype something like that. But interesting point between 
GetNewMultiXactId() and RecordNewMultiXact() is a critical section, and we 
cannot have injection points in critical sections...
Also, to implement such a test we need "wait" type of injection points, see 
step 2 in attachment. With this type of injection points I can stop a backend 
amidst entering information about new MultiXact.


Best regards, Andrey Borodin.

Attachment: 0001-Add-conditional-variable-to-wait-for-next-MultXact-o.patch
Description: Binary data

Attachment: 0002-Add-wait-type-for-injection-points.patch
Description: Binary data

Attachment: 0003-Try-to-test-multixact-CV-sleep.patch
Description: Binary data

Reply via email to