Re: Should pg_dumpall dump ALTER SYSTEM settings? - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: Should pg_dumpall dump ALTER SYSTEM settings?
Date
Msg-id 3b09b1b5aedc73727439ce900ecfd2e4e8eacd37.camel@cybertec.at
Whole thread Raw
In response to Re: Should pg_dumpall dump ALTER SYSTEM settings?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Should pg_dumpall dump ALTER SYSTEM settings?  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Wed, 2022-04-06 at 21:39 -0400, Robert Haas wrote:
> On Wed, Apr 6, 2022 at 2:26 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Thoughts?
> 
> I'm a little bit skeptical about this proposal, mostly because it
> seems like it has the end result that values that are configured in
> postgresql.conf and postgresql.auto.conf end up being handled
> differently: one file has to be copied by hand, while the other file's
> contents are propagated forward to the new version by pg_dump. I don't
> think that's what people are going to be expecting...

"postgresql.auto.conf" is an implementation detail, and I would expect
most users to distinguish between "parameters set in postgresql.conf"
and "parameters set via the SQL statement ALTER SYSTEM".
If that is the way you look at things, then it seems natural for the
latter to be included in a dump, but not the former.

As another case in point, the Ubuntu/Debian packages split up the data
directory so that the config files are under /etc, while the rest of
the data directory is under /var/lib.  "postgresql.auto.conf" is *not*
in /etc, but in /var/lib there.  So a user of these distributions would
naturally think that the config files in /etc need to be handled manually,
but "postgresql.auto.conf" need not.

I am +1 on Tom's idea.

Yours,
Laurenz Albe




pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Unit tests for SLRU
Next
From: Pavel Stehule
Date:
Subject: Re: aggregate array broken in postgresql 15.