Re: upgrade questions

Поиск
Список
Период
Сортировка
От Holger Jakobs
Тема Re: upgrade questions
Дата
Msg-id f57787ec-8e35-cc65-64a6-8b5fb2ce616b@jakobs.com
обсуждение исходный текст
Ответ на Re: upgrade questions  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-admin
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
Вложения

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Wetmore, Matthew (CTR)"
Дата:
Сообщение: RE: upgrade questions
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: upgrade questions