Re: pg_upgrade: Pass -j down to vacuumdb - Mailing list pgsql-hackers

From Jesper Pedersen
Subject Re: pg_upgrade: Pass -j down to vacuumdb
Date
Msg-id bef52417-2416-cb97-afce-a351601eab43@redhat.com
Whole thread Raw
In response to Re: pg_upgrade: Pass -j down to vacuumdb  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: pg_upgrade: Pass -j down to vacuumdb  (Andres Freund <andres@anarazel.de>)
RE: pg_upgrade: Pass -j down to vacuumdb  ("Jamison, Kirk" <k.jamison@jp.fujitsu.com>)
RE: pg_upgrade: Pass -j down to vacuumdb  ("Jamison, Kirk" <k.jamison@jp.fujitsu.com>)
List pgsql-hackers
Hi,

On 2/1/19 4:58 AM, Alvaro Herrera wrote:
> On 2019-Feb-01, Jamison, Kirk wrote:
> 
>> I'm not sure if misunderstood the purpose of $VACUUMDB_OPTS. I thought what
>> the other developers suggested is to utilize it so that --jobs for vacuumdb
>> would be optional and just based from user-specified option $VACUUMDB_OPTS.
>> By which it would not utilize the amount of jobs used for pg_upgrade.
>> To address your need of needing a parallel, the script would just then
>> suggest if the user wants a --jobs option. The if/else for number of jobs is
>> not needed in that case, maybe only for ifndef WIN32 else case.
> 
> No Kirk, you got it right -- (some of) those ifdefs are not needed, as
> adding the --jobs in the command line is not needed.  I do think some
> extra whitespace in the format string is needed.
> 

I'm confused by this.

The point of the patch is to highlight to the user that even though 
he/she does "pg_upgrade -j 8" the "-j 8" option isn't passed down to 
vacuumdb.

Default value is 1, so in that case the echo command doesn't highlight 
that fact, otherwise it is. The user can then cancel the script and use 
the suggested command line.

The script then executes the vaccumdb command with the $VACUUMDB_OPTS 
argument as noted in the documentation.

Sample script attached as well.

I added extra space in the --analyze-in-stages part.

Kirk, can you provide a delta patch to match what you are thinking ?

Best regards,
  Jesper


Attachment

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Ryu floating point output patch
Next
From: Jesper Pedersen
Date:
Subject: Re: Index Skip Scan