Re: parallel vacuum - few questions on docs, comments and code

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-12T04:17:58Z
Lists: pgsql-hackers
On Tue, May 11, 2021 at 6:31 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> On Tue, May 11, 2021 at 05:37:50PM +0530, Bharath Rupireddy wrote:
> > 3) Should the Assert(nindexes > 0); in begin_parallel_vacuum just be
> > Assert(nindexes > 1); as this function is entered only when indexes
> > are > 1?
>
> I think you're right, at least with the current implementation that
> parallelization is done across indexes.  Same in parallel_vacuum_main.
>

Yeah, as code stands both of you are right. However, it can be helpful
to test parallelism even with one index say if we implement something
like force_parallel_mode = regress or parallel_leader_participation =
off.

-- 
With Regards,
Amit Kapila.



Commits

  1. Improve docs and error messages for parallel vacuum.