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

From Michael Paquier
Subject Re: pg_upgrade: Pass -j down to vacuumdb
Date
Msg-id 20190125102859.GD6459@paquier.xyz
Whole thread Raw
In response to RE: pg_upgrade: Pass -j down to vacuumdb  ("Jamison, Kirk" <k.jamison@jp.fujitsu.com>)
Responses Re: pg_upgrade: Pass -j down to vacuumdb  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Fri, Jan 25, 2019 at 02:31:57AM +0000, Jamison, Kirk wrote:
> I'm not sure if I have understood the argument raised by Peter
> correctly.  Quoting Peter, "it's not clear that pg_upgrade and
> vacuumdb are bound the same way, so it's not a given that the same
> -j number should be used."  I think it's whether the # jobs for
> pg_upgrade is used the same way for parallel vacuum.

vacuumdb and pg_upgrade are designed for different purposes and have
different properties, hence using a value of -j for one does not
necessarily mean that the same value should be used for the other.
An ANALYZE is nice because it is non-intrusive for a live production
system, and if you begin to pass down a -j argument you may finish by
eating more resources that would have been necessary for the same
job.  For some users perhaps that matters, for some it does not.  So
based on that linking the value used by pg_upgrade and vacuumdb is a
bad concept in my opinion, and the patch should be rejected.  More
documentation on pg_upgrade side to explain that a bit better could be
a good idea though, as it is perfectly possible to use your own
post-upgrade script or rewrite partially the generated one.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Simplify set of flags used by MyXactFlags
Next
From: Peter Eisentraut
Date:
Subject: Re: using expression syntax for partition bounds