Re: Set arbitrary GUC options during initdb

Поиск
Список
Период
Сортировка
От Isaac Morland
Тема Re: Set arbitrary GUC options during initdb
Дата
Msg-id CAMsGm5ciem-sWuDoAwmww1grCvdNrq17KJQ4dxhdvZ2911aOuQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Set arbitrary GUC options during initdb  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On Fri, 27 Jan 2023 at 09:49, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
On 25.01.23 22:25, Tom Lane wrote:
> So this invents an initdb switch "-c NAME=VALUE" just like the
> one that the server itself has long had.

This seems useful.

> The specified settings
> are applied on the command line of the initial probe calls
> (which happen before we've made any config files), and then they
> are added to postgresql.auto.conf, which causes them to take
> effect for the bootstrap backend runs as well as subsequent
> postmaster starts.

I would have expected them to be edited into postgresql.conf.  What are
the arguments for one or the other?

That would be my expectation also. I believe that is how it works now for options which can be set by initdb, such as locale and port. I view postgresql.auto.conf being for temporary changes, or changes related to different instances within a replication setup, or whatever other uses people come up with - but not for the permanent configuration established by initdb.

In particular, I would be surprised if removing a postgresql.auto.conf completely disabled an instance. Obviously, in my replication setup example, the replication would be broken, but the basic operation of the instance would still be possible.

Also, if somebody wants to put a change in postgresql.auto.conf, they can easily do it using ALTER SYSTEM once the instance is running, or by just writing out their own postgresql.auto.conf before starting it. Putting a change in postgresql.conf programmatically is a bit of a pain.

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

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Lazy JIT IR code generation to increase JIT speed with partitions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Named Operators