Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  • Acquire the port information for the current database. Typically, this value is 5432.
    D s pssql port
  • Acquire the latest distribution for the database software.

...

  1. Install the Postgres repo for yum. Below, PostgreSQL 9.6 is installed.
    1. 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


    2. 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


    3. 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


    4. 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


  2. Install the upgraded version. Below, PostgreSQL 9.6 is installed.

    Code Block
    sudo apt-getyum install postgresql-9.6 postgresql-server-dev-9.6 postgresql-contrib-9.6postgresql96.x86_64 postgresql96-server.x86_64 postgresql96-contrib.x86_64 -y


  3. Create a new data directory for the new database version:

    1. For CentOS 7.x:

      Code Block
      sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb


    2. For CentOS 6.x, RHEL 6.x:

      Code Block
      sudo service postgresql-9.6 initdb


    3. For RHEL 7.x:

      Code Block
      sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb


  4. 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 message.

  5. Stop the old version of the database service as the root user:
    1. CentOS/RHEL:

      Code Block
      sudo service postgresql-9.3 stop


  6. Run the upgrade as the postgres user user:
    1. 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 14.04 (Trusty)

Steps:

  1. Stop the platform:

    Code Block
    service trifacta stop


  2. 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


  3. Stop PostgreSQL:

    Code Block
    sudo systemctl stop postgresql
    service stop postgresql
    service postgresql stop


  4. 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"'


  5. Remove the old version of PostgreSQL (9.3):

    Code Block
    sudo apt-get remove postgresql-9.3 -y


  6. Restart PostgreSQL and the platform:

    Code Block
    service postgresql start
    service trifacta start
  7. Verify that you can load datasets and run jobs. See Verify Operations.

 

...



Excerpt

Upgrade for Ubuntu 16.04 (Xenial)

...

For more information on upgrading PostgreSQL on Ubuntu 16.04 (Xenial), please contact 

D s support
.

Steps:

  1. Stop the platform:

    Code Block
    service trifacta stop


  2. 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


  3. Stop PostgreSQL:

    Code Block
    sudo systemctl stop postgresql
    service stop postgresql
    service postgresql stop


  4. 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"'


  5. Remove the old version of PostgreSQL (9.3):

    Code Block
    sudo apt-get remove postgresql-9.3 -y


  6. Restart PostgreSQL and the platform:

    Code Block
    service postgresql start
    service trifacta start




Transfer Settings

For all operating systems, you must transfer the settings from your old version of PostgreSQL to the new one.

  1. Update the port number and any other settings in the platform configuration. 
    D s config
    methodtriconf

    1. Replace all instances of the PostgreSQL port number for the earlier version and replace with the desired port number for the upgrade version. 
    2. By default, PostgreSQL 9.3 uses 5432.
    3. By default, PostgreSQL 9.6 uses 5433.
    4. D s pssql port
    5. Make the above changes and save the file.
  2. Transfer settings from the configuration files for your old database version to the new one. Please review the old and new versions of these files:

    Info

    NOTE: It is risky to perform a straight copy of these configuration files. Settings may change. New ones may be introduced. Setting values specific to to the installation may be overwritten in a copy. Please retain a backup of both versions of each file before migrating settings.


    Path to PostgreSQL 9.3 filePath to PostgreSQL 9.6 file
    /var/lib/pgsql/9.3/data/pg_hba.conf/var/lib/pgsql/9.6/data/pg_hba.conf
    /var/lib/pgsql/9.3/data/postgresql.conf/var/lib/pgsql/9.6/data/postgresql.conf


  3. Start the service:
    1. CentOS/RHEL:

      Code Block
      sudo service postgresql-9.6 start


    2. Ubuntu:

      Code Block
      sudo service postgresql start


    3. When the service restarts, you can check the cluster status using the following script:

      Code Block
      ./analyze_new_cluster.sh


  4. After you have completed the database installation, you must review the port number of the newly installed database, which may have changed between versions of the database software. That new port number must be applied through the 

    D s item
    itemsoftware
    . For more information, see Change Database Port.

  5. Verify datestyle setting.

    Info

    NOTE: If the PostgreSQL instance used by the

    D s platform
    was not created as part of the
    D s item
    iteminstallation
    , please verify that the PostgreSQL datestyle value begins with ISO. For more information, see Configure the Databases.



  6. If all is well, restart the platform. See Start and Stop the Platform

...