Re: [PATCH] Find additional connection service files inpg_service.conf.d directory - Mailing list pgsql-hackers

From Curt Tilmes
Subject Re: [PATCH] Find additional connection service files inpg_service.conf.d directory
Date
Msg-id CAMv20O8T5n7qZYbuKOw29jb3L7iW55tU4C2tK4OpUnAt+w0kZg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Find additional connection service files inpg_service.conf.d directory  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: [PATCH] Find additional connection service files inpg_service.conf.d directory
List pgsql-hackers

On Thu, Jul 19, 2018 at 5:39 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
Handy feature!

On 01/03/18 20:40, Curt Tilmes wrote:
> On Thu, Mar 1, 2018 at 1:13 PM, Andres Freund <andres@anarazel.de> wrote:
>> And within the directory which service file wins will be decided by
>> filesystem internals. That makes me a bit uncomfortable, this very well
>> might not be stable.  I think it might not be terrible idea to sort the
>> directory and process alphabetically?
>
> My preference would be not to do this.  I added a note to the doc about
> this.

I also think we should process the files in alphabetical order. That's
how most software with conf.d directories work.

In my experience, this is not a problem with such directories.  Sysadmins and operations folks who map in such definitions understand how to do it right.

Is there a qsort() routine already accessible from that source file, or do we have to link in yet another sort?

Should we also search ~/.pg_service.conf.d ? And a PGSERVICEDIR env
variable, to mirror PGSERVICEFILE. I don't think many people would use
those, but I feel like it would be good to have consistency, so that
wherever we search for "pg_service.conf" file, we also search for
"pg_service.conf.d" directory.

In my experience with other software, I've not seen that to be the case..  Individuals will use the single file in their home dir, while sysadmins and operations folks have much more call to split things into multiple files.  I would rather keep things simple than add unnecessary complexity for its own sake.

Curt

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Standby trying "restore_command" before local WAL
Next
From: Tomas Vondra
Date:
Subject: Re: Standby trying "restore_command" before local WAL