Re: Options given both on cmd-line and in the config with different values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Options given both on cmd-line and in the config with different values
Дата
Msg-id 3566642.1618422939@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Options given both on cmd-line and in the config with different values  (Honza Horak <hhorak@redhat.com>)
Ответы Re: Options given both on cmd-line and in the config with different values
Список pgsql-hackers
Honza Horak <hhorak@redhat.com> writes:
> I'm trying to understand what is happening in the following bug report:
> https://bugzilla.redhat.com/show_bug.cgi?id=1935301

> The upgrade process makes it a bit more difficult, but it seems to boil 
> down to this problem -- even when pg_ctl gets clear guidance where to 
> find datadir using -D option on the command-line, it forgets this 
> guidance once finding data_directory option in the postgresql.conf.

> Is this the expected behavior actually?

The rule actually is that -D on the command line says where to find
the configuration file.  While -D is then also the default for where
to find the data directory, the config file can override that by
giving data_directory explicitly.

This is intended to support situations where the config file is kept
outside the data directory for management reasons.  If you are not
actively doing that, I'd recommend *not* setting data_directory
explicitly in the file.

While I've not studied the bug report carefully, it sounds like the
update process you're using involves copying the old config file
across verbatim.  You'd at minimum need to filter out data_directory
and related settings to make that safe.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Converting contrib SQL functions to new style
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Converting contrib SQL functions to new style