Re: pg_upgrade: Pass -j down to vacuumdb

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>
Cc: 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>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "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-01-29 20:19:28
Message-ID: 37538daf-5f5b-afed-b3f5-a64e154e6433@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 1/29/19 12:08 AM, Michael Paquier wrote:
> On Tue, Jan 29, 2019 at 12:35:30AM +0000, Jamison, Kirk wrote:
>> I just checked the patch.
>> As per advice, you removed the versioning and specified --jobs.
>> The patch still applies, builds and passed the tests successfully.
>
> I would document the optional VACUUM_OPTS on the page of pg_upgrade.
> If Peter thinks it is fine to not do so, that's fine for me as well.
>

I added most of the documentation back, as requested by Kirk.

> It seems to me that the latest patch sent is incorrect for multiple
> reasons:
> 1) You still enforce -j to use the number of jobs that the caller of
> pg_upgrade provides, and we agreed that both things are separate
> concepts upthread, no? What has been suggested by Alvaro is to add a
> comment so as one can use VACUUM_OPTS with -j optionally, instead of
> suggesting a full-fledged vacuumdb command which depends on what
> pg_upgrade uses. So there is no actual need for the if/else
> complication business.

I think it is ok for the echo command to highlight to the user that
running --analyze-only using the same amount of jobs will give a faster
result.

> 2) Perhaps we need to worry about the second vacuumdb --all command,
> which may want custom options, which are not necessarily the same as
> the options of the first command? I don't think we need to care as it
> applies only to an upgraded cluster using something older 8.4, just
> wondering..

I think that --all --analyze-in-stages is what most people want. And
with the $VACUUMDB_OPTS variable people have an option to put in more,
such as -j X.

Best regards,
Jesper

Attachment Content-Type Size
v6_0001-Highlight-that-the-jobs-option-isn-t-passed-down-to-.patch text/x-patch 3.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-01-29 20:23:51 Re: Why are we PageInit'ing buffers in RelationAddExtraBlocks()?
Previous Message Tom Lane 2019-01-29 19:52:44 Re: Early WIP/PoC for inlining CTEs