Re: Thoughts on a "global" client configuration?

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thoughts on a "global" client configuration?
Date: 2025-10-09 15:09:07
Message-ID: CAOYmi+=rkcN6jED7masx178xFsBhoH9BcYJLTtisvjW-TRKtKQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 9, 2025 at 5:28 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> I'm never going to be a fan of the idea of changing libpq defaults
> with any frequency, no matter what configuration options we have. If
> we change those defaults with any regularity, I think it will cause a
> lot of problems for a lot of people.

Agreed. (My proposal doesn't advocate for "regular" breakage.)

> When there's not agreement on
> what to change, leaving things unchanged is often the best answer,

I think that's how we get into situations like "everyone hates
sslmode=require but no one will change it." I'm looking to add a tool
to make agreement easier in the first place.

(Maybe there's a better tool than a configuration file? But I'd like
to see what a file looks like, because I'm not familiar with any other
network client that requires you to put every setting into the URI you
use to contact the server. If you know of one please tell me so I can
study it.)

> because it at least has the virtue of not causing random breakage. I
> also think that Andrew raises a good point about the use of
> environment variables. That seems like it serves much the same purpose
> as a global configuration file, so I'm not sure we should have both.

I prefer simplicity, too, but environment variables for libpq mean
"this is a trusted setting that you should prefer to the default, even
if it's worse". That's not a good fit for the security-related
settings I'm concerned with changing.

--Jacob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-10-09 15:10:07 Re: Adding some error context for lock wait failures
Previous Message Aleksander Alekseev 2025-10-09 15:08:39 Re: [PATCH] Remove unused #include's in src/backend/commands/*