Re: upgrade questions

Поиск
Список
Период
Сортировка
От Ed Sabol
Тема Re: upgrade questions
Дата
Msg-id A57355A6-E651-4111-AD48-5D266E315541@gmail.com
обсуждение исходный текст
Ответ на upgrade questions  (David Barron <david.barron@zencos.com>)
Список pgsql-admin
On Feb 9, 2024, at 12:00 PM, David Barron <david.barron@zencos.com> wrote:
> As the postgres user run these two commands
>
> /usr/pgsql-15/bin/initdb -D /pgdata-system/15/data
> /usr/pgsql-15/bin/pg_upgrade -b /usr/pgsql-11/bin -B /usr/pgsql-15/bin -d /pgdata-system/11/data -D
/pgdata-system/15/data

I just went through this a few months ago myself, except I was coming from 10.23.

I'm not sure how large your database is, but, unless it's on the small side, I recommend adding the command line switch
`--link`.I think this requires that /pgdata-system/11/data and /pgdata-system/15/data be on the same volume. Also, if
youhave multiple CPUs or CPU cores, you can add `--jobs=##` and it can do some of the stuff in parallel. These two
additionswill speed up the upgrade drastically on large databases. I also like to add the `-v` switch just so that you
getsome indication of what pg_upgrade is doing. 

I recommend that you make sure your pg_hba.conf files in both /pgdata-system/11/data and /pgdata-system/15/data are set
totrust local connections from the postgres account. 

Also, before you schedule your downtime for the upgrade, run your pg_upgrade command with the `--check` argument. That
willdo a dry run and let you know if you have any issues. Then you should resolve those issues beforehand such that you
canrun the pg_upgrade command with `--check` and not encounter any errors or warnings. That way, when it comes time to
performthe upgrade to your production system, you shouldn't encounter any problems. 

I encountered issues with user roles and extensions. It's been a while, but, IIRC, I think I had to change the
ownershipof some things and/or install the extensions we use in the 15.x server before pg_upgrade would run correctly. 

Good luck,
Ed




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

Предыдущее
От: Holger Jakobs
Дата:
Сообщение: Re: Use AD-account as login into Postgres.
Следующее
От: Pär Mattsson
Дата:
Сообщение: Re: Use AD-account as login into Postgres.