Re: parallel vacuum comments

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: parallel vacuum comments
Date: 2021-11-16 05:53:18
Message-ID: CAD21AoAxeUyeL-aGAS=CkHU9PA7UgcSDLXztb=ZjvE5UbcDbvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 16, 2021 at 11:38 AM houzj(dot)fnst(at)fujitsu(dot)com
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Thur, Nov 11, 2021 10:41 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > I've attached a draft patch that refactors parallel vacuum and separates
> > parallel-vacuum-related code to new file vacuumparallel.c.
> > After discussion, I'll divide the patch into logical chunks.
>
> Hi.
>
> I noticed few minor issues in the patch.
>
> 1)
> + /*
> + * Parallel unsafe indexes can be processed only by leader (these are
> + * processed in lazy_serial_process_indexes() by leader.
> + */
>
> It seems the function name in the comments should be serial_vacuum_unsafe_indexes
>
> 2)
> + stats->parallel_workers_can_process =
> + index_parallel_vacuum_is_safe(pvc->indrels[i],
> + pvc->num_index_scans,
> + bulkdel);
>
> The function index_parallel_vacuum_is_safe also return false for the
> index < min_parallel_index_scan_size cutoff which seems parallel safe. So,
> maybe we can rename the function to xxx_worker_can_process() ?

Thank you for the comments!

I've incorporated these comments and attached an updated patch.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

Attachment Content-Type Size
parallel_vacuum_refactor_v3.patch application/octet-stream 89.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-11-16 06:12:38 Re: Unnecessary global variable declared in xlog.c
Previous Message Amul Sul 2021-11-16 05:47:27 Unnecessary global variable declared in xlog.c