Re: Thoughts on a "global" client configuration?

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thoughts on a "global" client configuration?
Date: 2025-10-15 19:35:36
Message-ID: CAMsGm5dQjv2sPcA2NO8n4M5mefcbKckZw0adVcePEu=fkjm+Hg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 15 Oct 2025 at 15:20, Peter Eisentraut <peter(at)eisentraut(dot)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]
host=dev.postgres.example.com

[service1] extends default
host=postgres.example.com
user=appuser

[service2] extends default
host=postgres2.example.com
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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-10-15 19:49:19 Re: Thoughts on a "global" client configuration?
Previous Message Tom Lane 2025-10-15 19:21:50 Re: [PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward