11.4. Upgrading remote databases from PostgreSQL 9.5 to 10
Red Hat Virtualization 4.3 uses PostgreSQL 10 instead of PostgreSQL 9.5. If your databases are installed locally, the upgrade script automatically upgrades them from version 9.5 to 10. However, if either of your databases (Manager or Data Warehouse) is installed on a separate machine, you must perform the following procedure on each remote database before upgrading the Manager.
Stop the service running on the machine:
When upgrading the Manager database, stop the
ovirt-engine
service on the Manager machine:# systemctl stop ovirt-engine
When upgrading the Data Warehouse database, stop the
ovirt-engine-dwhd
service on the Data Warehouse machine:# systemctl stop ovirt-engine-dwhd
Enable the required repository to receive the PostgreSQL 10 package:
Enable either the Red Hat Virtualization Manager repository:
# subscription-manager repos --enable=rhel-7-server-rhv-4.3-manager-rpms
or the SCL repository:
# subscription-manager repos --enable rhel-server-rhscl-7-rpms
Install the PostgreSQL 10 packages:
# yum install rh-postgresql10 rh-postgresql10-postgresql-contrib
Stop and disable the PostgreSQL 9.5 service:
# systemctl stop rh-postgresql95-postgresql # systemctl disable rh-postgresql95-postgresql
Upgrade the PostgreSQL 9.5 database to PostgreSQL 10:
# scl enable rh-postgresql10 -- postgresql-setup --upgrade-from=rh-postgresql95-postgresql --upgrade
Start and enable the
rh-postgresql10-postgresql.service
and check that it is running:# systemctl start rh-postgresql10-postgresql.service # systemctl enable rh-postgresql10-postgresql.service # systemctl status rh-postgresql10-postgresql.service
Ensure that you see output similar to the following:
rh-postgresql10-postgresql.service - PostgreSQL database server Loaded: loaded (/usr/lib/systemd/system/rh-postgresql10-postgresql.service; enabled; vendor preset: disabled) Active: active (running) since ...
Copy the
pg_hba.conf
client configuration file from the PostgreSQL 9.5 environment to the PostgreSQL 10 environment:# cp -p /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_hba.conf /var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf
Update the following parameters in
/var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf
:listen_addresses='*' autovacuum_vacuum_scale_factor=0.01 autovacuum_analyze_scale_factor=0.075 autovacuum_max_workers=6 maintenance_work_mem=65536 max_connections=150 work_mem = 8192
Restart the PostgreSQL 10 service to apply the configuration changes:
# systemctl restart rh-postgresql10-postgresql.service
You can now upgrade the Manager to 4.3.