Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goDvx-0006p6-S8 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 20:55:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goDvw-0003VH-N2 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 20:55:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goDvw-0003Rq-E0 for pgsql-hackers@lists.postgresql.org; Mon, 28 Jan 2019 20:55:08 +0000 Received: from mail-qt1-f193.google.com ([209.85.160.193]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goDvt-00061U-Ap for pgsql-hackers@lists.postgresql.org; Mon, 28 Jan 2019 20:55:08 +0000 Received: by mail-qt1-f193.google.com with SMTP id r14so19988336qtp.1 for ; Mon, 28 Jan 2019 12:55:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language; bh=vnb4ixXTNhOfVwnQVs+r86+N5NO9m5c+4JRKoYNJbKY=; b=W2rXIywgKRvbb9IOXo/YWkFt9mk6V6W3W7r/Lb0F9WGXTvNegCURrAdtL8rRaKgJ2v JpgzDOmusi5MWqyO7+Md1F/RKD0sPoKtdd/HLeqK4/WRgDx/X+LiOoJMNR8YMRh58IkR Oq5KtMgN78blA4xJ9rziiKA4f8imdfKiGOaQQ5qyRYdqlBePZWwtqx5kSM3sM5d3LA2X Dxxbu7yIF6IPou5nyk6gc3JjLmcCYrr+muK37yxYYb0y6Cic3OzwsPIBQ9SG4t+cIqIA xd4I7agfGXRYROy/WRXkxJo5ah/RxICsvNa1kAMqrAhMsIo3gjYUz4taxGsYHUBbGBY/ hEbA== X-Gm-Message-State: AJcUukdeAAb6W6i07dEQsKkZaboPhu1cI1P4WHunMRv5jkMLcApe5nfb z6TS1gyMjDxg+hLIPDG9dGDW2g== X-Google-Smtp-Source: ALg8bN52RZD/VFSWXPfeKNUiznNlnbzfAbT8qdb4wmw8BuCwO2QuanqZHVHSZzzWYMP4EzSGQNZphw== X-Received: by 2002:ad4:420a:: with SMTP id k10mr21478357qvp.206.1548708902964; Mon, 28 Jan 2019 12:55:02 -0800 (PST) Received: from localhost.localdomain (c-24-61-8-151.hsd1.ma.comcast.net. [24.61.8.151]) by smtp.gmail.com with ESMTPSA id x202sm69672514qka.67.2019.01.28.12.55.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 12:55:01 -0800 (PST) Reply-To: jesper.pedersen@redhat.com Subject: Re: pg_upgrade: Pass -j down to vacuumdb To: Peter Eisentraut Cc: fabriziomello@gmail.com, "Jamison, Kirk" , Tom Lane , Alvaro Herrera , Michael Paquier , "pgsql-hackers@lists.postgresql.org" , Bruce Momjian References: <11b6b108-6ac0-79a6-785a-f13dfe60ab92@redhat.com> <2dc5eaeb-e60d-2a16-696e-7b4d3d3548cb@redhat.com> <59f9323a-fee8-88f6-16ab-2319149b00be@2ndquadrant.com> <5b7d95ba-8920-357d-1ec6-1084ce34a9e6@redhat.com> <388de5bc-858b-4686-d2e5-d0b21981dd72@redhat.com> <4ce565f9-d21f-039f-8f5a-2e16e6aa1ae4@redhat.com> From: Jesper Pedersen Organization: Red Hat Message-ID: Date: Mon, 28 Jan 2019 15:55:00 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------D8492DFB03A3B2CF2F9230A9" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------D8492DFB03A3B2CF2F9230A9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------D8492DFB03A3B2CF2F9230A9 Content-Type: text/x-patch; name="v5_0001-Highlight-that-the-jobs-option-isn-t-passed-down-to-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v5_0001-Highlight-that-the-jobs-option-isn-t-passed-down-to-"; filename*1=".patch" From 5b51f927dff808b4a8516b424c2ef790dbe96da6 Mon Sep 17 00:00:00 2001 From: jesperpedersen 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 --- 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.c index 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 --------------D8492DFB03A3B2CF2F9230A9--