Re: Thoughts on a "global" client configuration? - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: Thoughts on a "global" client configuration?
Date
Msg-id CAMsGm5dQjv2sPcA2NO8n4M5mefcbKckZw0adVcePEu=fkjm+Hg@mail.gmail.com
Whole thread Raw
In response to Re: Thoughts on a "global" client configuration?  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Thoughts on a "global" client configuration?
List pgsql-hackers
On Wed, 15 Oct 2025 at 15:20, Peter Eisentraut <peter@eisentraut.org> wrote:
On 06.10.25 20:05, Jacob Champion wrote:
> I started on a proof of concept and very quickly hit a fork. Do I
> 1) introduce a completely new config file, or
> 2) adapt pg_service.conf to this use case?

I've been thinking about this kind of thing for a long time, and my
intuition has always been to have some kind of [default] section in
pg_service.conf.  That would probably be relatively easy.

Maybe have a way to specify one or more "base" configurations for each service?

Something like (except please don't use the "extends" keyword, I've done enough Java already; pick some punctuation instead):

[default]
sslmode=require

[dev]

[service1] extends default
user=appuser

[service2] extends default
user=otherappuser

[service1-dev] extends default, dev
user=appuser

I don't know how big a deal it is that this is no longer an "INI" file.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward
Next
From: Jacob Champion
Date:
Subject: Re: Thoughts on a "global" client configuration?