此内容没有您所选择的语言版本。

Chapter 7. Upgrading a Remote Database Environment from 4.1 to Red Hat Virtualization 4.2


Upgrading your environment from 4.1 to 4.2 involves the following steps:

7.1. Upgrading Remote Databases from PG 9.2 to 9.5

Red Hat Virtualization 4.2 uses PostgreSQL 9.5 instead of PostgreSQL 9.2. If your databases are installed locally, the upgrade script will automatically upgrade them from version 9.2 to 9.5, and you can skip this section and proceed to the next step. 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.

  1. Stop the service running on the machine:

    • Stop the ovirt-engine service on the Manager machine:

      # systemctl stop ovirt-engine
      Copy to Clipboard Toggle word wrap
    • Stop the ovirt-engine-dwh service on the Data Warehouse machine:

      # systemctl stop ovirt-engine-dwhd
      Copy to Clipboard Toggle word wrap
  2. Enable the required repository to receive the PostgreSQL 9.5 package:

    Enable either the Red Hat Virtualization Manager repository:

    # subscription-manager repos --enable=rhel-7-server-rhv-4.2-manager-rpms
    Copy to Clipboard Toggle word wrap

    or the SCL repository:

    # subscription-manager repos --enable rhel-server-rhscl-7-rpms
    Copy to Clipboard Toggle word wrap
  3. Install the PostgreSQL 9.5 packages:

    # yum install rh-postgresql95 rh-postgresql95-postgresql-contrib
    Copy to Clipboard Toggle word wrap
  4. Stop and disable the PostgreSQL 9.2 service:

    # systemctl stop postgresql
    # systemctl disable postgresql
    Copy to Clipboard Toggle word wrap
  5. Upgrade the PostgreSQL 9.2 database to PostgreSQL 9.5:

    # scl enable rh-postgresql95 -- postgresql-setup upgrade
    Copy to Clipboard Toggle word wrap
  6. Start and enable the rh-postgresql95-postgresql.service and check that it is running:

    # systemctl start rh-postgresql95-postgresql.service
    # systemctl enable rh-postgresql95-postgresql.service
    # systemctl status rh-postgresql95-postgresql.service
    Copy to Clipboard Toggle word wrap

    Ensure that you see an output similar to the following:

    rh-postgresql95-postgresql.service - PostgreSQL database server
       Loaded: loaded (/usr/lib/systemd/system/rh-postgresql95-postgresql.service;
    enabled; vendor preset: disabled)
       Active: active (running) since Mon 2018-05-07 08:48:27 CEST; 1h 59min ago
    Copy to Clipboard Toggle word wrap
  7. Log in to the database and enable the uuid-ossp extension:

    # su - postgres -c "scl enable rh-postgresql95 -- psql -d database-name"
    Copy to Clipboard Toggle word wrap
  8. Execute the following SQL commands:

    # database-name=# DROP FUNCTION IF EXISTS uuid_generate_v1();
    # database-name=# CREATE EXTENSION "uuid-ossp";
    Copy to Clipboard Toggle word wrap
  9. Copy the pg_hba.conf client configuration file from the 9.2 environment to your 9.5 environment:

    # cp -p /var/lib/pgsql/data/pg_hba.conf  /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_hba.conf
    Copy to Clipboard Toggle word wrap
  10. Update the following parameters in the postgresql.conf file:

    # vi /var/opt/rh/rh-postgresql95/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'
    Copy to Clipboard Toggle word wrap
  11. Restart the PostgreSQL 9.5 service to apply the configuration changes:

    # systemctl restart rh-postgresql95-postgresql.service
    Copy to Clipboard Toggle word wrap

    The remote databases have been upgraded.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat