Re: Postgresql 9.0.6 backends pruning process environment?

Поиск
Список
Период
Сортировка
От dennis jenkins
Тема Re: Postgresql 9.0.6 backends pruning process environment?
Дата
Msg-id CAAEzAp8G0BFS7L3zzCT5f1uxjA9O8iZDZOMs4Y5KhiYDM0+Bxg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgresql 9.0.6 backends pruning process environment?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Wed, Feb 15, 2012 at 9:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> On Wed, Feb 15, 2012 at 06:40, dennis jenkins
>> <dennis.jenkins.75@gmail.com> wrote:
>>> I recently updated my Gentoo Linux development system from postgresql
>>> 9.0.4 to 9.0.6-r1 (9.0.6 plus some Gentoo specific patches).  One of
>>> my 'C' language functions (been using it for years) stopped working
>>> because the backend no longer had access to the PGDATA environment
>>> variable.  A snippet of code is included below.
>
>> I suggest you look at the version history of the gentoo packaging and
>> scripts instead. My guess is that something was changed there.
>
> Yes.  A PG backend will not remove a "PGDATA" envar, but *it does not
> set it either*.  This sounds to me like a change in the startup script.
>
>> You can look at the configuration variable data_directory, or use the
>> C symbol DataDir which is exported from the backend.
>
> Quite --- at the C level, looking at DataDir is the right thing, and
> looking at PGDATA could be misleading even if it exists --- consider
> the possibility that we took the data_directory setting from the
> command line or postgresql.conf.
>
>                        regards, tom lane

Magnus, Tom,

    Thank you very much.  My code now uses 'DataDir' (export in
server/miscadmin.h) and it works fine.

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

Предыдущее
От: Tomonari Katsumata
Дата:
Сообщение: Re: postgresql90-server package for RHEL5
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: MD5 salt in pg_authid password hashes