Re: [PATCH] Use bounded GIN pending-list cleanup in parallel autovacuum - Mailing list pgsql-hackers

From Jingtang Zhang
Subject Re: [PATCH] Use bounded GIN pending-list cleanup in parallel autovacuum
Date
Msg-id CAPsk3_C8MVu9y0JFgoJeEsiTefvrMc1mva-C8VHXD+JbExOU+A@mail.gmail.com
Whole thread
In response to Re: [PATCH] Use bounded GIN pending-list cleanup in parallel autovacuum  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: [PATCH] Use bounded GIN pending-list cleanup in parallel autovacuum
Re: [PATCH] Use bounded GIN pending-list cleanup in parallel autovacuum
List pgsql-hackers
Hi Andrey,

Thanks for the review!

> distinguish the leader from its workers.  Perhaps a comment at the
> macro definition noting that autovacuum's parallel workers return
> false would help prevent similar mistakes.

Attached is v2 with the comment you suggested for
AmAutoVacuumWorkerProcess().

> Could we cover the parallel-worker path with a test?  One possible
> scenario is to pause cleanup while flushing the old tail into the main
> index, append new pending pages, and verify that cleanup leaves those
> new pages behind.  The test would need to ensure that a parallel worker,
> not the leader, handles the index; otherwise it could pass without
> the fix.  I have not tried this scenario yet.

For the test, I haven't found a reliable way to control the timing
without adding injection points. We need to ensure that a parallel
worker handles the index, and append new pending pages while cleanup
is flushing the old tail into the main index.

Do you have any ideas for a simpler way to test this?

---
Best regards,
Jingtang Zhang

Attachment

pgsql-hackers by date:

Previous
From: Sehrope Sarkuni
Date:
Subject: Re: [PATCH] set_byte() with a count argument
Next
From: Tomas Vondra
Date:
Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE