Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc8pw-0002j0-JM for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Nov 2020 15:12:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kc8pv-0006Zp-Hi for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Nov 2020 15:12:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc8pu-0006Zi-HX for pgsql-hackers@lists.postgresql.org; Mon, 09 Nov 2020 15:12:03 +0000 Received: from [64.147.123.21] (helo=wout5-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kc8pr-0005dG-NS for pgsql-hackers@lists.postgresql.org; Mon, 09 Nov 2020 15:12:01 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 4AE2C1271; Mon, 9 Nov 2020 10:11:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 09 Nov 2020 10:11:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=OiS+s/g7BY58sqsUu 0fMFpJWiohov8ljdP0b9o56YOw=; b=WsOKR0yXPjdbe0U6EjjphfOvXNtuO/KEy bhtoACxpUEiSqAlskmS58yAyS22tz9qXdVxSuAGjiS3KJ5NPxIfejOslcmyHnB89 Dez1Nl3ISFxb7qIPdwdsT7gHwRsrG3Q6LWfBd663Vl4/BeUZU86KOv/Z+4Biuvgw wbknu6HjdFmJCyyXzErykJN8EVjgitRcaT7bA/tJSgKpqi3SXlM4gxXqvClVvd9W R/wwBhcYBMDig8ossKvIo3Ff5YF/QYjLMpC1BexSD1xGBWI3qGfv/dCFtvwRgFjW D2dVVPhTlYImO0gyFb/NOzL/AfG/DyQ8PAZczzb8DrnS4AjPvLmiQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudduhedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggujggfsehttdertddtredvnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeevgfelveegueejgefhgeetgefhgeehieefheehleetteei udeiiefhgffgheffteenucfkphepudeltddrleehrdduledrudegkeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 7C770328006A; Mon, 9 Nov 2020 10:11:46 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D74262A154D; Mon, 9 Nov 2020 12:11:43 -0300 (-03) Date: Mon, 9 Nov 2020 12:11:43 -0300 From: Alvaro Herrera To: Magnus Hagander Cc: Anastasia Lubennikova , Bruce Momjian , Peter Eisentraut , PostgreSQL Developers Subject: Re: Prevent printing "next step instructions" in initdb and pg_upgrade Message-ID: <20201109151143.GA7225@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.21 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Nov-09, Magnus Hagander wrote: > On Mon, Nov 9, 2020 at 3:29 PM Alvaro Herrera wrote: > > > > How about a switch like "--with-scripts=" where the list can be > > "all" to include everything (default), "none" to include nothing, or a > > comma-separated list of things to include? (Also "--with-scripts=help" > > to query which things are supported) So > > "--with-scripts=reindex_hash,largeobject" omits the useless > > delete_old_cluster script and keeps the ones you want. > > > > Perhaps you could see it in the negative direction as more convenient, > > so --suppress-scripts=delete_old_cluster > > What would be the actual use-case in this though? The point is that we can do this just this time, and then in the future we'll already have a mechanism for emitting or suppressing scripts that are useful for some cases but not others. If I read you right, we currenly have two cases: the user is either running it manually (in which case you claim they want all scripts) or there's a wrapper (in which case reindex_hash et al are useful, others are not). But what if, say, we determined that it's a good idea to suggest to migrate BRIN indexes from v1 to v2 for datatype X? If your tooling is prepared to deal with that then it'll find the script useful, otherwise it's junk. And we don't have to have a new option "--include-brin-upgrade" or whatever; just add a new value to the suppressable script list.