Re: Postgres and --config-file option

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Jelte Fennema-Nio <postgres@jeltef.nl>, Peter Eisentraut <peter@eisentraut.org>, "David G. Johnston" <david.g.johnston@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2024-05-16T23:11:17Z
Lists: pgsql-hackers
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.

         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 can fall behind changing this one, still I'm not sure if this
proposal is the optimal choice.  Adding this option to --help makes
sense when applied to this error message, but that's incomplete in
regard with the other GUCs where this concept applies.  A different
approach would be to do nothing in --help and change the reference of
--config-file to -c config_name=VALUE, which would be in line with
--help.
--
Michael

Commits

  1. doc: Mention more variant --name=value of -c name=value for postgres