pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: jesper.pedersen@redhat.com, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Cc: Bruce Momjian <bruce@momjian.us>
Subject: Re: pg_upgrade: Pass -j down to vacuumdb
Date: Thu, 3 Jan 2019 13:03:21 +0100
Message-ID: <59f9323a-fee8-88f6-16ab-2319149b00be@2ndquadrant.com> (raw)
In-Reply-To: <2dc5eaeb-e60d-2a16-696e-7b4d3d3548cb@redhat.com>
References: <11b6b108-6ac0-79a6-785a-f13dfe60ab92@redhat.com>
	<ba90295e-9734-07bc-3453-bfa878948478@2ndquadrant.com>
	<2dc5eaeb-e60d-2a16-696e-7b4d3d3548cb@redhat.com>

On 02/01/2019 20:47, Jesper Pedersen wrote:
> Well, that really depends. The user passed -j to pg_upgrade in order for 
> the upgrade to happen faster, so maybe they would expect, as I would, 
> that the ANALYZE phase would happen in parallel too.

pg_upgrade -j reduces the *downtime* caused by pg_upgrade during the
upgrade process.  Also, during said downtime, nothing else is happening,
so you can use all the resources of the machine.

Once the system is back up, you don't necessarily want to use all the
resources.  The analyze script is specifically written to run while
production traffic is active.  If you just want to run the analyze as
fast as possible, you can just run vacuumdb -j directly, without using
the script.

Moreover, 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.

Perhaps more documentation would be useful here.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (44+ messages)  latest in thread

Message-ID: <59f9323a-fee8-88f6-16ab-2319149b00be@2ndquadrant.com>
Permalink:  ../59f9323a-fee8-88f6-16ab-2319149b00be@2ndquadrant.com/
Also on:    postgresql.org/message-id/59f9323a-fee8-88f6-16ab-2319149b00be@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, pgsql-hackers@lists.postgresql.org, bruce@momjian.us
  Subject: Re: pg_upgrade: Pass -j down to vacuumdb
  In-Reply-To: <59f9323a-fee8-88f6-16ab-2319149b00be@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox