Re: Small doc patch about pg_service.conf - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Small doc patch about pg_service.conf
Date
Msg-id 54CDA868.9070704@gmx.net
Whole thread Raw
In response to Re: Small doc patch about pg_service.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Small doc patch about pg_service.conf
List pgsql-hackers
On 1/3/15 7:56 PM, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
>> On Sat, Jan 03, 2015 at 02:36:50PM -0500, Noah Misch wrote:
>>> The directory libpq consults is `pg_config --sysconfdir`
>
>> I was wrong there.  `pg_config --sysconfig` uses get_etc_path(), which adjusts
>> to post-installation moves of the installation tree.  parseServiceInfo() uses
>> the build-time SYSCONFDIR directly.
>
> Ugh.  That makes things messy.  Still, we're probably better off
> recommending `pg_config --sysconfdir` than anything else.  I doubt
> that the theoretical ability to do a post-installation move is used
> much, and it's certainly not used by people using a prepackaged build.
> So the recommendation would only be wrong for someone who had done such
> a move manually, and they'd probably know what to do anyway.

At least writing `pg_config --sysconfdir` indicates that it's in an
installation-specific location, whereas hardcoding /etc will create
confusion when it's not actually there.  (Incidentally, we use
/usr/local/pgsql/etc elsewhere in the documentation as a sample location.)

I propose the attached patch.


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Draft release notes up for review
Next
From: Pavel Stehule
Date:
Subject: Re: POLA violation with \c service=