...
- Install the upgraded version. Below, PostgreSQL 9.6 is installed.
For CentOS 6.x:
Code Block wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm sudo yum -y install pgdg-centos96-9.6-3.noarch.rpm
For CentOS 7.x:
Code Block wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm sudo yum -y install pgdg-centos96-9.6-3.noarch.rpm
For Red Hat Enterprise Linux 6.x:
Code Block wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm sudo yum -y install pgdg-redhat96-9.6-3.noarch.rpm
For Red Hat Enterprise Linux 7.x:
Code Block wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm sudo yum -y install pgdg-redhat96-9.6-3.noarch.rpm
Create a new data directory for the new database version:
For CentOS 7.x:
Code Block sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb
For CentOS 6.x, RHEL 6.x:
Code Block sudo service postgresql-9.6 initdb
For RHEL 7.x:
Code Block sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb
Use the following commands to verify that the upgrade is possible:
Code Block su postgres cd ~ /usr/pgsql-9.6/bin/pg_upgrade --old-bindir=/usr/pgsql-9.3/bin/ --new-bindir=/usr/pgsql-9.6/bin/ --old-datadir=/var/lib/pgsql/9.3/data/ --new-datadir=/var/lib/pgsql/9.6/data/ --check
If all is well, you should see a
Clusters are compatible
message.- Stop the old version of the database service as the root user:
CentOS/RHEL:
Code Block sudo service postgresql-9.3 stop
- Run the upgrade as the
postgres
user:CentOS/RHEL:
Code Block su postgres /usr/pgsql-9.6/bin/pg_upgrade --old-bindir=/usr/pgsql-9.3/bin/ --new-bindir=/usr/pgsql-9.6/bin/ --old-datadir=/var/lib/pgsql/9.3/data/ --new-datadir=/var/lib/pgsql/9.6/data/
Upgrade for Ubuntu
For Ubuntu 14.04 (Trusty)
Steps:
Stop the platform:
Code Block service trifacta stop
Install the upgraded version. Below, PostgreSQL 9.6 is installed.
Code Block sudo apt-get install postgresql-9.6 postgresql-server-dev-9.6 postgresql-contrib-9.6 -y
Stop PostgreSQL:
Code Block sudo systemctl stop postgresql service stop postgresql service postgresql stop
Upgrade the PostgreSQL 9.3 version to PostgreSQL 9.6, using the newly installed version:
D s property overflow Code Block sudo su - postgres -c '/usr/lib/postgresql/9.6/bin/pg_upgrade \ -b /usr/lib/postgresql/9.3/bin -B /usr/lib/postgresql/9.6/bin \ -d /var/lib/postgresql/9.3/main/ -D /var/lib/postgresql/9.6/main/ \ -O "-c config_file=/etc/postgresql/9.6/main/postgresql.conf" \ -o "-c config_file=/etc/postgresql/9.3/main/postgresql.conf"
Remove the old version of PostgreSQL (9.3):
Code Block sudo apt-get remove postgresql-9.3 -y
Review the PostgreSQL configuration file, and make any changes as necessary:
Code Block less /etc/postgresql/9.6/main/postgresql.conf
D s config method triconf - Replace all instances of the PostgreSQL port number for the earlier version and replace with the desired port number for the upgrade version.
- By default, PostgreSQL 9.3 uses
5432
. - By default, PostgreSQL 9.6 uses
5433
. - Make the above changes and save the file.
Restart PostgreSQL and the platform:
Code Block service postgresql start service trifacta start
- Verify that you can load datasets and run jobs. See Verify Operations.
For Ubuntu 16.04 (Xenial)
For more information on upgrading PostgreSQL on Ubuntu 16.04 (Xenial), please contact
D s support |
---|
...