Re: Postgres and --config-file option

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Peter Eisentraut <peter(at)eisentraut(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: Re: Postgres and --config-file option
Date: 2024-05-17 12:02:19
Message-ID: 202405171202.yaeeaov74ohx@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024-May-17, Michael Paquier wrote:

> On Thu, May 16, 2024 at 11:57:10AM +0300, Aleksander Alekseev wrote:
> > I propose my original v1 patch for correcting the --help output of
> > 'postgres' too. I agree with the above comments that corresponding
> > changes in v4 became somewhat unwieldy.
>
> Thanks for compiling the rest.
>
> - printf(_(" --NAME=VALUE set run-time parameter\n"));
> + printf(_(" --NAME=VALUE set run-time parameter, a shorter form of -c\n"));
>
> This part with cross-references in the output is still meh to me, for
> same reason as for the doc changes I've argued to discard upthread.

Was the idea considered of moving the --NAME=VALUE line to appear
together with -c? We already do that with "-?, --help" and "-V, --version",
so I think it's pretty reasonable:

Options:
-B NBUFFERS number of shared buffers
-c NAME=VALUE, --NAME=VALUE
set run-time parameter
-C NAME print value of run-time parameter, then exit
[...]

> write_stderr("%s does not know where to find the server configuration file.\n"
> - "You must specify the --config-file or -D invocation "
> + "You must specify the --config-file (or equivalent -c) or -D invocation "

I'd rather change the --help and leave this one alone.

About the final paragraph

Please read the documentation for the complete list of run-time
configuration settings and how to set them on the command line or in
the configuration file.

I was thinking we could mention that using --describe-config here could
help, but the literal output from that is quite ugly and unwieldy, more
suitable for machine consumption than humans. Would it be useful to add
another output format? Say, a --describe-config=man prints a
manpage-style table of options with their descriptions and links to the
online manual.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"No nos atrevemos a muchas cosas porque son difíciles,
pero son difíciles porque no nos atrevemos a hacerlas" (Séneca)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2024-05-17 12:19:41 Re: commitfest.postgresql.org is no longer fit for purpose
Previous Message Peter Eisentraut 2024-05-17 11:57:51 Re: GUC names in messages