Re: Small doc patch about pg_service.conf

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Small doc patch about pg_service.conf
Дата
Msg-id 30714.1420324412@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Small doc patch about pg_service.conf  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Small doc patch about pg_service.conf  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Sat, Jan 3, 2015 at 10:52 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> On 01/03/2015 04:41 PM, Magnus Hagander wrote:
>>> Yeah. But let's make sure we include "usually /etc" or something like
>>> that.

>> But it's not usually /etc. Certainly it's not in the PGDG RPM builds
>> unless they have changed recently.

> I thought  it was, based on Davids post from earlier. I know Debian moves
> them to /etc/postgresql-common - but they move a lot of the things around.
> I didn't realize the RPMs did something similar. If that's the case then
> it's definitely wrong to say that. I guess I haven't been using the system
> wide one on RedHat.

The reason the RH packages use /etc is that there's a distro-wide default
that configure gets invoked with --sysconfdir=/etc unless the packager
takes steps to override that.  The RH postgresql packages *did* take steps
to override that, up till about Fedora 16/RHEL7 --- before then the
arrangement was --sysconfdir=/etc/sysconfig/pgsql.  So David's comment
isn't even correct for the majority of Red Hat installations today.
Between that and your points about PGDG and Debian, it's clear that "/etc"
is wrong far more often than it's right.

I'd suggest wording along the lines of
 ... or it can be a system-wide file, which is named <filename>pg_service.conf</filename> and located in the directory
specifiedby the environment variable <envar>PGSYSCONFDIR</envar>. If that variable is not set, the system-wide file is
soughtin the directory displayed by <command>pg_config --sysconfig</command> (by default,
<filename><replaceable>installprefix</>/etc</filename>).

However, I don't know whether that advice also works for Windows;
can anyone check?
        regards, tom lane



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Small doc patch about pg_service.conf
Следующее
От: Andres Freund
Дата:
Сообщение: Re: logical column ordering