Magnus Hagander <mag...@hagander.net> writes:
> On Sat, Jan 3, 2015 at 10:52 PM, Andrew Dunstan <and...@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
  specified by the environment variable <envar>PGSYSCONFDIR</envar>.
  If that variable is not set, the system-wide file is sought in 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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to