Re: pg_upgrade: Pass -j down to vacuumdb

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, "fabriziomello(at)gmail(dot)com" <fabriziomello(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: pg_upgrade: Pass -j down to vacuumdb
Date: 2019-02-01 19:14:27
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers


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

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,

Attachment Content-Type Size
v7_0001-Highlight-that-the-jobs-option-isn-t-passed-down-to-.patch text/x-patch 3.1 KB application/x-shellscript 825 bytes

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper Pedersen 2019-02-01 19:24:38 Re: Index Skip Scan
Previous Message Andrew Gierth 2019-02-01 19:01:49 Re: Ryu floating point output patch