Re: Prevent printing "next step instructions" in initdb and pg_upgrade - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Prevent printing "next step instructions" in initdb and pg_upgrade
Date
Msg-id 20201109151143.GA7225@alvherre.pgsql
Whole thread Raw
In response to Re: Prevent printing "next step instructions" in initdb and pg_upgrade  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On 2020-Nov-09, Magnus Hagander wrote:

> On Mon, Nov 9, 2020 at 3:29 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> >
> > 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
> 
> 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.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: -Wformat-signedness
Next
From: Stephen Frost
Date:
Subject: Re: Disable WAL logging to speed up data loading