pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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 12:11:43 -0300
Message-ID: <20201109151143.GA7225@alvherre.pgsql> (raw)
In-Reply-To: <CABUevEwmczP6v3HYtf=Gapd1V9snoX8q3Gc3QOszoP11jHBHtA@mail.gmail.com>

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.






view thread (43+ messages)  latest in thread

Message-ID: <20201109151143.GA7225@alvherre.pgsql>
Permalink:  ../20201109151143.GA7225@alvherre.pgsql/
Also on:    postgresql.org/message-id/20201109151143.GA7225@alvherre.pgsql

 · 

reply

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: <20201109151143.GA7225@alvherre.pgsql>
  References: <CABUevEwmczP6v3HYtf=Gapd1V9snoX8q3Gc3QOszoP11jHBHtA@mail.gmail.com> <20201109151143.GA7225@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