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: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(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-21 05:40:15
Message-ID: CAA4eK1KGMfLPULexAc334H-DYqm4gGSty=-qyPT+u7ebXrzZAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 14, 2021 at 6:00 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Fri, May 14, 2021 at 10:43 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> >
> > Your changes look good. About changing the "non-negative integer" to
> > "greater than or equal to zero", there is another thread [1], I am not
> > sure that have we concluded anything there yet.
> >
> > - pg_log_error("parallel vacuum degree must be a non-negative integer");
> > + pg_log_error("parallel workers for vacuum must be greater than or
> > equal to zero");
> > exit(1);
> >
> > [1] https://www.postgresql.org/message-id/OS0PR01MB5716415335A06B489F1B3A8194569@OS0PR01MB5716.jpnprd01.prod.outlook.com
>
> Yeah. Tom proposed if (foo <= 0) { error:"foo must be greater than
> zero" } at [1]. In the subsequent messages both Michael and I agreed
> with that. But we also have cases like if (foo < 0) for which I think
> { error:"foo must be greater than or equal to zero" } would be better,
> similar to what's proposed. Please feel free to provide your thoughts
> there in that thread.
>

I responded on that thread and it seems there is no object to the new
message. I have a minor comment on your patch:

- printf(_(" -P, --parallel=PARALLEL_DEGREE use this many background
workers for vacuum, if available\n"));
+ printf(_(" -P, --parallel=PARALLEL_WORKERS use this many background
workers for vacuum, if available\n"));

If the patch changes the vacuumdb code as above then isn't it better
to change the vacuumdb docs to reflect the same. See below part of
vacuumdb docs:
-P parallel_degree
--parallel=parallel_degree

Also, can you please check if your patch works for PG-13 as well
because I think it is better to backpatch it?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-05-21 05:41:40 Re: Fdw batch insert error out when set batch_size > 65535
Previous Message Amit Kapila 2021-05-21 05:15:58 Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS