From: Yuhang Qiu <iamqyh@gmail.com>
To: Jingtang Zhang <mrdrivingduck@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: pgsql-hackers mailing list <pgsql-hackers@lists.postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Subject: Re: [PATCH] Use bounded GIN pending-list cleanup in parallel autovacuum
Date: Wed, 23 Sep 2026 15:58:25 +0800
Message-ID: <86E8514B-35DD-42F3-9386-360595E94032@gmail.com> (raw)
In-Reply-To: <CAPsk3_C8MVu9y0JFgoJeEsiTefvrMc1mva-C8VHXD+JbExOU+A@mail.gmail.com>
References: <CAPsk3_DiF2i1o=JRXRk1YPVMv1VzJaCAbfiEqgwCva4=ZewVAw@mail.gmail.com>
<452203E2-8B6B-4610-B184-684B04D4F26B@yandex-team.ru>
<CAPsk3_C8MVu9y0JFgoJeEsiTefvrMc1mva-C8VHXD+JbExOU+A@mail.gmail.com>
Hi Jingtang,
The fix in v2 LGTM. I used local injection points to test both
ginbulkdelete() and the ginvacuumcleanup() path where bulk deletion was
not performed.
The test ensures that a parallel worker handles the GIN index. It pauses
cleanup at the original tail page, after releasing the buffer content
lock, then appends new pending pages from another session. Without the
fix, both paths continue until the pending list is empty. With v2, both
leave new pending pages behind, matching serial autovacuum. Manual
parallel VACUUM still empties the pending list.
> Do you have any ideas for a simpler way to test this?
I haven't found a simpler, reliable way to test this without adding
injection points either. Given the extra machinery needed to test such
a small fix, I'd lean toward leaving it without a regression test.
Best regards,
Yuhang Qiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: iamqyh@gmail.com, mrdrivingduck@gmail.com, x4mmm@yandex-team.ru, pg@bowt.ie, sawada.mshk@gmail.com
Subject: Re: [PATCH] Use bounded GIN pending-list cleanup in parallel autovacuum
In-Reply-To: <86E8514B-35DD-42F3-9386-360595E94032@gmail.com>
References: <CAPsk3_DiF2i1o=JRXRk1YPVMv1VzJaCAbfiEqgwCva4=ZewVAw@mail.gmail.com> <452203E2-8B6B-4610-B184-684B04D4F26B@yandex-team.ru> <CAPsk3_C8MVu9y0JFgoJeEsiTefvrMc1mva-C8VHXD+JbExOU+A@mail.gmail.com> <86E8514B-35DD-42F3-9386-360595E94032@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox