Re: Postgres and --config-file option

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Postgres and --config-file option
Дата
Msg-id 20240113223800.GA4163814@nathanxps13
обсуждение исходный текст
Ответ на Postgres and --config-file option  (Aleksander Alekseev <aleksander@timescale.com>)
Ответы Postgres and --config-file option  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On Sat, Jan 13, 2024 at 01:39:50PM +0300, Aleksander Alekseev wrote:
> OK, let's check section "20.1.4. Parameter Interaction via the Shell"
> [1] of the documentation. Currently it doesn't tell anything about the
> ability to specify GUCs --like-this, unless I missed something.

It appears to be documented for 'postgres' as follows [0]:

    --name=value
        Sets a named run-time parameter; a shorter form of -c.

and similarly within the --help output:

    --NAME=VALUE       set run-time parameter

Its documentation also describes this method of specifying parameters in
the 'Examples' section.  The section you refer to calls out "-c", so it is
sort-of indirectly mentioned, but that might be a bit of a generous
assessment.

> Should we remove --config-file from the error message to avoid any
> confusion? Should we correct --help output? Should we update the
> documentation?

It might be worthwhile to update the documentation if it would've helped
prevent confusion here.

Separately, I noticed that this is implemented in postmaster.c by looking
for the '-' option character returned by getopt(), and I'm wondering why
this doesn't use getopt_long() instead.  AFAICT this dates back to the
introduction of GUCs in 6a68f426 (May 2000).

[0] https://www.postgresql.org/docs/devel/app-postgres.html

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: introduce dynamic shared memory registry
Следующее
От: jian he
Дата:
Сообщение: Re: SQL:2011 application time