From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Magnus Hagander <magnus@hagander.net>
Cc: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Prevent printing "next step instructions" in initdb and pg_upgrade
Date: Mon, 9 Nov 2020 11:28:56 -0300
Message-ID: <20201109142856.GA3956@alvherre.pgsql> (raw)
In-Reply-To: <CABUevEy1Vf7aHOfUM+3fAW=is+sGGzL2BufPai6eRayEy=FkSg@mail.gmail.com>
On 2020-Nov-09, Magnus Hagander wrote:
> But for usability that makes less sense. For the delete script, the
> wrapper (that the switch is intended for) knows more than pg_upgrade
> about how to delete it, so it can do a better job, and thus it makes
> sense to silence it. But for something like these .sql (and also in
> the previously mentioned case of extension upgrades), pg_upgrade knows
> more and the only thing the wrapper could do is to reimplement the
> same functionality, and maintain it.
>
> I wonder if the best way forward might be to revert it back to being a
> --no-instructions switch, remove the delete_old_cluster.sh script
> completely and just replace it with instructions saying "you should
> delete the old cluster", and then keep generating these scripts as
> necessary?
How about a switch like "--with-scripts=<list>" 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, magnus@hagander.net, a.lubennikova@postgrespro.ru, bruce@momjian.us, peter.eisentraut@2ndquadrant.com
Subject: Re: Prevent printing "next step instructions" in initdb and pg_upgrade
In-Reply-To: <20201109142856.GA3956@alvherre.pgsql>
References: <CABUevEy1Vf7aHOfUM+3fAW=is+sGGzL2BufPai6eRayEy=FkSg@mail.gmail.com> <20201109142856.GA3956@alvherre.pgsql>
* 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