Re: Using hba_file parameter and relative path

From: Don Seiler <don(at)seiler(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Using hba_file parameter and relative path
Date: 2017-09-28 19:28:51
Message-ID: CAHJZqBDN9PNq2rsVN=M7oTdr4A9_ORAk5iVRJ_ByCaRQLgfONg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Sep 28, 2017 at 2:15 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> ​Its the documented behavior.
>
> "​When setting any of these parameters, a relative path will be
> interpreted with respect to the directory in which postgres is started."
>
> https://www.postgresql.org/docs/9.6/static/runtime-
> config-file-locations.html
>
> Why would we want that hba_file value to be relative to something as
>> volatile as pwd?
>>
>
> Why do you want it under PGDATA but not in the root directory thereof?
>

For the sake of grouping and source control, I put my configs into a
subdirectory of PGDATA. I wanted to keep them separate from the other files
and directories in PGDATA.

Thanks for pointing out the documentation reference, I missed that in my
own search.

> In any case if you are going to use relative paths then "pwd" should be a
> considered part of the architecture and not something that is considered
> "volatile". That seems to be how most programs behave and I don't see much
> advantage for PostgreSQL to be different in this regard.
>

Obviously just my opinion, but I do consider it "volatile" in the sense
that I could be (and usually am) anywhere on the host system when calling
the startup. Perhaps I'm the outlier though since I'm relatively new to the
Postgres game.

Anyway, since this is working as documented, I now know to use the absolute
path to avoid the issue.

Cheers,
Don.

--
Don Seiler
www.seiler.us

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Elson Vaz 2017-10-03 13:46:07 Acess Control !
Previous Message David G. Johnston 2017-09-28 19:15:26 Re: Using hba_file parameter and relative path