How to upgrade PostgreSQL9.5 to 12

Опубликовано: 10 Февраль 2021
на канале: Dignesh Patel
3,698
32

This video is about the up-gradation process for the PostgreSQL9.5 to 12.

Before upgrade please make sure sufficient disk space is available. Some extensions like. PostGIS will not be upgraded during this process. You may drop the extension from 9.5, installed it on Postgres12, and create the extension. It's recommended to take a backup before doing the up-gradation process on the production environment.

Please find the below list of commands used in the up-gradation process.

Install the repository RPM:
sudo yum install -y https://download.postgresql.org/pub/r...


Install PostgreSQL9.5:
sudo yum install -y postgresql95-server

Initialize the database and start service:
sudo /usr/pgsql-9.5/bin/postgresql95-setup initdb

Install PostgreSQL12:
sudo yum install -y postgresql12-server

Initialize the database and start service:
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb

PostgeSQL upgrade command syntax

pg_upgrade -b oldbindir -B newbindir -d oldconfigdir -D newconfigdir [option...]

PostgeSQL Cluster compatibity check
/usr/pgsql-12/bin/pg_upgrade --old-bindir /usr/pgsql-9.5/bin/ --new-bindir /usr/pgsql-12/bin/ --old-datadir /var/lib/pgsql/9.5/data/ --new-datadir /var/lib/pgsql/12/data --link --check

Upgrade Command
/usr/pgsql-12/bin/pg_upgrade --old-bindir /usr/pgsql-9.5/bin/ --new-bindir /usr/pgsql-12/bin/ --old-datadir /var/lib/pgsql/9.5/data/ --new-datadir /var/lib/pgsql/12/data --link


#postgresql


Смотрите видео How to upgrade PostgreSQL9.5 to 12 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Dignesh Patel 10 Февраль 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,69 раз и оно понравилось 3 людям.