Re: libpq environment variables in the server

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: libpq environment variables in the server
Дата
Msg-id 744962da-c27f-c992-4058-364463857ee0@2ndquadrant.com
обсуждение исходный текст
Ответ на libpq environment variables in the server  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: libpq environment variables in the server  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On 2019-01-21 11:42, Peter Eisentraut wrote:
> Maybe pg_ctl should have some functionality to clear the environment,
> and maybe there could be a facility in postgresql.conf to set
> environment variables.

After pondering this, this seemed to be the best solution.

Many init systems already clear the environment by default, so that the
started services don't have random environment settings inherited from
the user.  However, you can't easily do this when using pg_ctl directly,
so having an option to clear the environment in pg_ctl seems generally
useful.  Then we can use it in the test suites and thus avoid
environment variables leaking in in unintended ways.

That revealed that we do need the second mechanism to set environment
variables after everything has been cleared.  One example in the test
suite is LDAPCONF.  But there are other cases that could be useful, such
as any environment settings that would support archive_command or
restore_command.  I think this would also be a nice feature in general,
so that you can keep all the configuration together in the configuration
files and don't have to rely on external mechanisms to inject these
environment variables.

Attached are two patches that implement these features.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Ramanarayana
Дата:
Сообщение: Re: libpq debug log
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Progress reporting for pg_verify_checksums