Re: [PATCH] Find additional connection service files in pg_service.conf.d directory

From: Curt Tilmes <curt(at)tilmes(dot)org>
To: hlinnaka(at)iki(dot)fi
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Find additional connection service files in pg_service.conf.d directory
Date: 2018-08-06 15:20:31
Message-ID: CAMv20O8T5n7qZYbuKOw29jb3L7iW55tU4C2tK4OpUnAt+w0kZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 19, 2018 at 5:39 AM Heikki Linnakangas <hlinnaka(at)iki(dot)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(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-08-06 15:40:02 Re: Standby trying "restore_command" before local WAL
Previous Message Stephen Frost 2018-08-06 15:19:23 Re: Standby trying "restore_command" before local WAL