Re: Add version and data directory to initdb output

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add version and data directory to initdb output
Date: 2022-04-20 21:21:29
Message-ID: CAKFQuwYJ+JRrsE9u10BNtE390XQB4JoXEPYxr9QMn7+WRxhRMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 20, 2022 at 2:04 PM Peter Eisentraut <
peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:

> On 19.04.22 15:55, David G. Johnston wrote:
> > The motivating situation had me placing it as close to the last line as
> > possible so my 8 line or so tmux panel would show it to me without
> > scrolling. The version is all I cared about, but when writing the patch
> > the path seemed to be at least worth considering.
> >
> > As for "Success", I'm confused about the --no-instructions choice to
> > change it the way it did, but given that precedent I only felt it
> > important to leave the word Success as the leading word on a line.
> > Scripts should be triggering on the exit code anyway and presently
> > --no-instructions removes the Success acknowledgement completely anyway.
>
> The order of outputs of initdb seems to be approximately
>
> 1. These are the settings I will use based on what you told me.
> 2. This is what I'm doing right now.
> 3. Here's what you can do next.
>
> Your additions would appear to fall into bucket #1. So I think adding
> them near the start of the output makes more sense. Otherwise, one
> could also argue that all the locale information etc. should also be
> repeated at the end, in case one forgot them or whatever.
>

I agree with the observation but it initdb is fast enough and
non-interactive and so that order isn't particularly appealing.

Thus either:

1. Initialization is running ... Here's what we are doing.
2. All done! Here's what we did.
3. Here's what you can do next.

or

1. These are the settings I will use based on what you told me.
2. This is what I'm doing right now.
3. All done! Here's what you ended up with (can repeat items from 1 if
desired...)
4. Here's what you can do next.

I'd rather do the first proposal given buy-in. Though I would have
concerns about what the output looks like upon failure.

I'm basically proposing the second option, add a formal "All done!" section
and recap what the final result is. I'd be content with having the version
appear in both 1 and 3 in that scenario. It isn't a frequently executed
command, already is verbose, and when done interactively in development I
don't want to have to dedicate a 20 line panel so I can see "All Done!" and
some (one) key attribute(s) (locale and path seems useful though) without
scrolling.

If the consensus is to place it before, and only before, the "this is what
I'm doing right now" stuff, that is better than nothing, but the choice of
not doing so was intentional.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-04-20 21:32:08 Re: typos
Previous Message Tom Lane 2022-04-20 21:10:18 Re: renumber_oids.pl needs some updates