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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: parallel vacuum - few questions on docs, comments and code
Date: 2021-05-13 06:28:29
Message-ID: CAA4eK1Lz6YveKqDzY1NWq42jS1k8mQ0ay2vPvpknyT_kmGVw-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 12, 2021 at 6:30 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Wed, May 12, 2021 at 9:48 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Tue, May 11, 2021 at 6:31 PM Justin Pryzby <pryzby(at)telsasoft(dot)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.
>
> I see that currently we don't have it yet. Is it worth implementing
> them? Something like 1) when force_parallel_mode = regress, spawn one
> parallel worker, send the relation information to it, so that it
> performs vacuuming both the relation and it's indexes. 2)
> parallel_leader_participation = off, spawn workers as specified, but
> don't let the leader to vacuum index, so that any worker can pick it
> up. I'm not sure of the complexity though.
>

We had some patch on the above lines in the original development
thread which has been used for testing during development but not sure
how much useful it is now. However, I am fine if others think
something like that is useful.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-05-13 06:32:04 Re: Inherited UPDATE/DELETE vs async execution
Previous Message Amit Kapila 2021-05-13 06:25:05 Re: parallel vacuum - few questions on docs, comments and code