From: Bruce Momjian <bruce@momjian.us>
To: Magnus Hagander <magnus@hagander.net>
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: Wed, 11 Nov 2020 10:53:05 -0500
Message-ID: <20201111155305.GF12947@momjian.us> (raw)
In-Reply-To: <CABUevEx+WfayfmA3+vd+u=Ox3o=AtHQSiC7f-86cyeLzVV8ceA@mail.gmail.com>
References: <CABUevEzo4t5bmTXF0_B9WzmuWpVbMpkNZZiGvzV8NZa-=fPqeQ@mail.gmail.com>
<df2b2919-6e85-41ca-6570-3ae8ff86d889@2ndquadrant.com>
<20201027105308.GI4951@momjian.us>
<d8d691e9-b4cb-b063-a9f1-af8d3d62cac8@2ndquadrant.com>
<20201027114000.GL4951@momjian.us>
<CABUevEx+WfayfmA3+vd+u=Ox3o=AtHQSiC7f-86cyeLzVV8ceA@mail.gmail.com>
On Mon, Nov 2, 2020 at 02:23:35PM +0100, Magnus Hagander wrote:
> On Tue, Oct 27, 2020 at 12:40 PM Bruce Momjian <bruce@momjian.us> wrote:
> >
> > On Tue, Oct 27, 2020 at 12:35:56PM +0100, Peter Eisentraut wrote:
> > > On 2020-10-27 11:53, Bruce Momjian wrote:
> > > > On Tue, Oct 27, 2020 at 11:35:25AM +0100, Peter Eisentraut wrote:
> > > > > On 2020-10-06 12:26, Magnus Hagander wrote:
> > > > > > I went with the name --no-instructions to have the same name for both
> > > > > > initdb and pg_upgrade. The downside is that "no-instructions" also
> > > > > > causes the scripts not to be written in pg_upgrade, which arguably is a
> > > > > > different thing. We could go with "--no-instructions" and
> > > > > > "--no-scripts", but that would leave the parameters different. I also
> > > > > > considered "--no-next-step", but that one didn't quite have the right
> > > > > > ring to me. I'm happy for other suggestions on the parameter names.
> > > > >
> > > > > What scripts are left after we remove the analyze script, as discussed in a
> > > > > different thread?
> > > >
> > > > There is still delete_old_cluster.sh.
> > >
> > > Well, that one can trivially be replaced by a printed instruction, too.
> >
> > True. On my system is it simply:
> >
> > rm -rf '/u/pgsql.old/data'
> >
> > The question is whether the user is going to record the vacuumdb and rm
> > instructions that display at the end of the pg_upgrade run, or do we
> > need to write it down for them in script files.
>
> That assumes for example that you've had no extra tablespaces defined
> in it. And it assumes your config files are actually in the same
> directory etc.
>
> Now, pg_upgrade *could* create a script that "actually works" for most
> things, since it connects to the system and could then enumerate
> things like tablespaces and config file locations, and generate a
> script that actually uses that information.
Uh, pg_upgrade does enumerate things like tablespaces in
create_script_for_old_cluster_deletion(). I think config file locations
are beyond the scope of what we want pg_upgrade to handle.
In summary, I think the vacuumdb --analyze is now a one-line command,
but the delete part can be complex and not easily typed.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
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: bruce@momjian.us, magnus@hagander.net, peter.eisentraut@2ndquadrant.com
Subject: Re: Prevent printing "next step instructions" in initdb and pg_upgrade
In-Reply-To: <20201111155305.GF12947@momjian.us>
References: <CABUevEzo4t5bmTXF0_B9WzmuWpVbMpkNZZiGvzV8NZa-=fPqeQ@mail.gmail.com> <df2b2919-6e85-41ca-6570-3ae8ff86d889@2ndquadrant.com> <20201027105308.GI4951@momjian.us> <d8d691e9-b4cb-b063-a9f1-af8d3d62cac8@2ndquadrant.com> <20201027114000.GL4951@momjian.us> <CABUevEx+WfayfmA3+vd+u=Ox3o=AtHQSiC7f-86cyeLzVV8ceA@mail.gmail.com> <20201111155305.GF12947@momjian.us>
* 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