From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: fabriziomello@gmail.com, "Jamison, Kirk" <k.jamison@jp.fujitsu.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>
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, 28 Jan 2019 15:55:00 -0500
Message-ID: <be5cd0aa-304f-1b9f-68b4-0c747c67f73b@redhat.com> (raw)
In-Reply-To: <e103a8a1-a6f1-5709-6ac6-95684fd5bff2@2ndquadrant.com>
References: <11b6b108-6ac0-79a6-785a-f13dfe60ab92@redhat.com>
<ba90295e-9734-07bc-3453-bfa878948478@2ndquadrant.com>
<2dc5eaeb-e60d-2a16-696e-7b4d3d3548cb@redhat.com>
<59f9323a-fee8-88f6-16ab-2319149b00be@2ndquadrant.com>
<5b7d95ba-8920-357d-1ec6-1084ce34a9e6@redhat.com>
<D09B13F772D2274BB348A310EE3027C64137E4@g01jpexmbkw24>
<c448acf6-7c38-3d6d-c663-5387ccffb906@redhat.com>
<D09B13F772D2274BB348A310EE3027C6413F1A@g01jpexmbkw24>
<388de5bc-858b-4686-d2e5-d0b21981dd72@redhat.com>
<CAFcNs+qCPbzErgcmTDqW2qzkt7kzarjWqD48VimKD4mXM0nutA@mail.gmail.com>
<4ce565f9-d21f-039f-8f5a-2e16e6aa1ae4@redhat.com>
<e103a8a1-a6f1-5709-6ac6-95684fd5bff2@2ndquadrant.com>
On 1/28/19 3:50 PM, Peter Eisentraut wrote:
>> Done, and v4 attached.
>
> I would drop the changes in pgupgrade.sgml. We don't need to explain
> what doesn't happen, when nobody before now ever thought that it would
> happen.
>
> Also, we don't need the versioning stuff. The new cluster in pg_upgrade
> is always of the current version, and we know what that one supports.
>
Done.
Best regards,
Jesper
Attachments:v5_0001-Highlight-that-the-jobs-option-isn-t-passed-down-to-.patch (text/x-patch, 2.2K) download
From 5b51f927dff808b4a8516b424c2ef790dbe96da6 Mon Sep 17 00:00:00 2001
From: jesperpedersen <jesper.pedersen@redhat.com>
Date: Fri, 21 Dec 2018 05:05:31 -0500
Subject: [PATCH] Highlight that the --jobs option isn't passed down to
vacuumdb by default.
Author: Jesper Pedersen <jesper.pedersen@redhat.com>
---
src/bin/pg_upgrade/check.c | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.cindex fc5aa7010f..847e604088 100644--- a/src/bin/pg_upgrade/check.c+++ b/src/bin/pg_upgrade/check.c@@ -495,15 +495,31 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
ECHO_QUOTE, ECHO_QUOTE);
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);+ if (user_opts.jobs <= 1)+ {+ 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);+ }+ else+ {+ fprintf(script, "echo %s \"%s/vacuumdb\" %s--jobs %d --all %s%s\n", ECHO_QUOTE,+ new_cluster.bindir, user_specification.data, user_opts.jobs,+ /* Did we copy the free space files? */+ (GET_MAJOR_VERSION(old_cluster.major_version) >= 804) ?+ "--analyze-only" : "--analyze", ECHO_QUOTE);+ }
fprintf(script, "echo%s\n\n", ECHO_BLANK);
- fprintf(script, "\"%s/vacuumdb\" %s--all --analyze-in-stages\n",+#ifndef WIN32+ fprintf(script, "\"%s/vacuumdb\" %s$VACUUMDB_OPTS --all --analyze-in-stages\n",
new_cluster.bindir, user_specification.data);
+#else+ fprintf(script, "\"%s\\vacuumdb.exe\" %s%%VACUUMDB_OPTS%% --all --analyze-in-stages\n",+ new_cluster.bindir, user_specification.data);+#endif
/* Did we copy the free space files? */
if (GET_MAJOR_VERSION(old_cluster.major_version) < 804)
fprintf(script, "\"%s/vacuumdb\" %s--all\n", new_cluster.bindir,
--
2.17.2
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: jesper.pedersen@redhat.com, peter.eisentraut@2ndquadrant.com, k.jamison@jp.fujitsu.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org, bruce@momjian.us
Subject: Re: pg_upgrade: Pass -j down to vacuumdb
In-Reply-To: <be5cd0aa-304f-1b9f-68b4-0c747c67f73b@redhat.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