From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Subject: | Re: parallel vacuum - few questions on docs, comments and code |
Date: | 2021-05-12 12:58:05 |
Message-ID: | CALj2ACX_eP4m5Qc_0hVuwRgmOiMkKiyoPeFx=RB6JgirujbA6A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 11, 2021 at 6:31 PM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> > 4) IIUC, below comment says that even if PARALLEL 0 is specified with
> > VACUUM command, there are chances that the indexes are vacuumed in
> > parallel. Isn't it a bit unusual that a user specified 0 workers but
> > still the system is picking up parallelism? I'm sure this would have
> > been discussed, but I'm curious to know the reason.
> > * nrequested is the number of parallel workers that user requested. If
> > * nrequested is 0, we compute the parallel degree based on nindexes, that is
> > * the number of indexes that support parallel vacuum.
>
> No - nrequested is not actually the number of workers requested - it seems like
> a poor choice of name.
>
> This is the key part:
>
> src/include/commands/vacuum.h
> * The number of parallel vacuum workers. 0 by default which means choose
> * based on the number of indexes. -1 indicates parallel vacuum is
> * disabled.
> */
> int nworkers;
> } VacuumParams;
Thanks. The name "nworkers" looks fine to me after reading the comment
above it. And the parallelism will be chosen by default.
/* By default parallel vacuum is enabled */
params.nworkers = 0;
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2021-05-12 13:00:17 | Re: parallel vacuum - few questions on docs, comments and code |
Previous Message | David Rowley | 2021-05-12 12:55:33 | Do we need to rethink how to parallelize regression tests to speedup CLOBBER_CACHE_ALWAYS? |