Re: PostgreSQL configuration

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL configuration
Дата
Msg-id 11672.1081790366@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PostgreSQL configuration  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: PostgreSQL configuration  (Kevin Brown <kevin@sysexperts.com>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> pgsql@mohawksoft.com wrote:
> What if someone does -C /var/data/postgresql.conf, and postgresql.conf
> say to use /usr/local/data for data, what do we do?

Well, the patch says that the command line switch wins, which is
consistent with what we do for other command line switches (they all
override the equivalent postgresql.conf entries).  This does seem a
bit at variance with the stated goal of making the configuration more
clearly documented, though :-(.  If you actually use the capability then
your config file will be lying to you about where things are.

It's worth pointing out in this connection that for the most part
I think people are moving *away* from using command line switches;
it's better to set the value in postgresql.conf, both for documentation
reasons and because that way you have some chance of changing the value
via config file update and SIGHUP.  The only way to change a value on
the command line is to restart the postmaster.  Plus, if you're using a
distribution-supplied init script to start the postmaster, it's hard to
get any switches in without hacking the script anyway.

Most of these objections also apply to values obtained from environment
variables (the exception is that postgresql.conf can override
environment variables).

So all in all I feel that we don't want to encourage more use of command
line switches or environment variables to configure the postmaster.
        regards, tom lane


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Solaris initdb fails: shmmax tweak alternative?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: PostgreSQL configuration