Re: upgrade questions

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: upgrade questions
Date: 2024-02-09 17:41:39
Message-ID: f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Am 09.02.24 um 18:07 schrieb Scott Ribe:
>> On Feb 9, 2024, at 10:00 AM, David Barron<david(dot)barron(at)zencos(dot)com> wrote:
>>
>> I’ve also seen references to copying over the pg_hba.conf and postgresql.conf files from the old data directory to the new.
> Then you will be getting default values for the many, many parameters added to postgresql.conf between 11 & 15--and will have no explanatory entries documenting them. A much better suggestion is to diff the two, and apply customizations from the old to the new. (Also skim release notes for any that have been mooted.)

Scott is right. Copying an old postgresql.conf over a new one is a
terrible idea.

There is the general advice to never make changes to postgresql.conf
(except activating the include_dir instruction close to the end of the
file).

include_dir = 'conf.d'            # include files ending in '.conf' from
                    # a directory, e.g., 'conf.d'

Some distributions have this only as a comment, so remove the # at the
beginning of the line and don't forget to at least create the directory
conf.d, because some distribution packages don't create it.

ALL changes to the configuration should go into files within this
directory having names ending in .conf

If you have these, it's very easy to copy them over to a new cluster
(same or newer major version) and adapt if necessary.

It's best to copy sections from the original postgresql.conf including
all comments and make necessary changes only within the conf.d directory.

Regards,

Holger

--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2024-02-09 17:43:03 Re: upgrade questions
Previous Message Wetmore, Matthew (CTR) 2024-02-09 17:12:21 RE: upgrade questions