pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jesper.pedersen@redhat.com
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jamison, Kirk <k.jamison@jp.fujitsu.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: fabriziomello@gmail.com <fabriziomello@gmail.com>
Cc: 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: Mon, 25 Mar 2019 17:57:50 -0400
Message-ID: <30470.1553551070@sss.pgh.pa.us> (raw)
In-Reply-To: <03845f77-49e7-4569-7062-8ee1fb460ec2@redhat.com>
References: <201902010958.cf2cbi3d2ule@alvherre.pgsql>
	<bef52417-2416-cb97-afce-a351601eab43@redhat.com>
	<D09B13F772D2274BB348A310EE3027C64659E9@g01jpexmbkw24>
	<CA+TgmobMGTfkMY-isz4pLw_bfywVOqTUDcW+obeAfYSeTBJM7A@mail.gmail.com>
	<03845f77-49e7-4569-7062-8ee1fb460ec2@redhat.com>

Jesper Pedersen <jesper.pedersen@redhat.com> writes:
> [ v9_0001-Highlight-that-the-jobs-option-isn-t-passed-down-to-.patch ]

Now that I've looked at this, it seems like it's fairly confused about
what the proposed VACUUMDB_OPTS variable would actually do for you.
If you're going to run vacuumdb directly, it hardly seems like you'd
bother with setting such a variable; you'd just enter the options you
want directly on the command line.

Conversely, if what you plan to do is set VACUUMDB_OPTS and then
run this script, the fact that --analyze-in-stages is hard-wired
into the script's invocation doesn't seem right either: you probably
don't want that if your goal is to get done as fast as possible.

In short, I'm not convinced that most of this patch is an improvement
on the status quo.  I think we'd be best off to just take the idea
of explicitly mentioning adding --jobs to a manual run, ie roughly

	fprintf(script, "echo %sthis script and run:%s\n",
			ECHO_QUOTE, ECHO_QUOTE);
	fprintf(script, "echo %s    \"%s/vacuumdb\" %s--all %s%s\n", ECHO_QUOTE,
			new_cluster.bindir, user_specification.data,
	/* Did we copy the free space files? */
			(GET_MAJOR_VERSION(old_cluster.major_version) >= 804) ?
			"--analyze-only" : "--analyze", ECHO_QUOTE);
+	fprintf(script, "echo %sYou may wish to add --jobs=N for parallel analyzing.%s\n",
+			ECHO_QUOTE, ECHO_QUOTE);
	fprintf(script, "echo%s\n\n", ECHO_BLANK);

	fprintf(script, "\"%s/vacuumdb\" %s--all --analyze-in-stages\n",


			regards, tom lane




view thread (44+ messages)  latest in thread

Message-ID: <30470.1553551070@sss.pgh.pa.us>
Permalink:  ../30470.1553551070@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30470.1553551070@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jesper.pedersen@redhat.com, robertmhaas@gmail.com, k.jamison@jp.fujitsu.com, alvherre@2ndquadrant.com, michael@paquier.xyz, peter.eisentraut@2ndquadrant.com, fabriziomello@gmail.com, pgsql-hackers@lists.postgresql.org, bruce@momjian.us
  Subject: Re: pg_upgrade: Pass -j down to vacuumdb
  In-Reply-To: <30470.1553551070@sss.pgh.pa.us>

* 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