pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: upgrade questions
Date: Fri, 9 Feb 2024 18:41:39 +0100
Message-ID: <f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com> (raw)
In-Reply-To: <6EF3E79A-DC46-4E47-9088-48230FE235A7@elevated-dev.com>
References: <PH0PR22MB33529D6B6891D52EAF8706FCE94B2@PH0PR22MB3352.namprd22.prod.outlook.com>
	<6EF3E79A-DC46-4E47-9088-48230FE235A7@elevated-dev.com>

Am 09.02.24 um 18:07 schrieb Scott Ribe:
>> On Feb 9, 2024, at 10:00 AM, David Barron<david.barron@zencos.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



Attachments:

  [application/pgp-signature] OpenPGP_signature (202B, ../f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com/3-OpenPGP_signature)
  download

view thread (10+ messages)  latest in thread

Message-ID: <f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com>
Permalink:  ../f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com/
Also on:    postgresql.org/message-id/f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: upgrade questions
  In-Reply-To: <f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox