Initializing help system before first use

Upgrading to PostgreSQL 11

This topic contains the steps to upgrade your Red Hat Enterprise Linux database to PostgreSQL 11.
If you are migrating to PostgreSQL 11 from an older version you will need to check the encoding of the existing database first and if it differs from the default UTF8 encoding you will need to change the initdb command accordingly.
Note These are RHEL 7 commands. RHEL 6 users must translate the service commands into the old form.
  1. Make sure PostgreSQL 9.5 is running.
    systemctl status postgresql-9.5
  2. Check existing database encoding and collation:
    sudo -u postgres psql postgres -c 'SHOW server_encoding'
    sudo -u postgres psql postgres -c 'SHOW lc_collate'
    
  3. If the value returned by the server_encoding command is NOT UTF8 then adjust the initdb command. For example (assuming default data directory):
    # With custom collation (locale) and encoding
    sudo -u postgres /usr/pgsql-11/bin/initdb --locale C --encoding SQL_ASCII /var/lib/pgsql/11/data
    
  4. Stop PostgreSQL 9.5.
    systemctl stop postgresql-9.5
Note If you have configured an alternative PostgreSQL data directory then you will also need to use that alternative data directory in the initdb command.
# With alternative data directory
sudo -u postgres /usr/pgsql-11/bin/initdb --locale C --encoding SQL_ASCII /path/to/alternative/pgsql/data
After initializing the new PostgreSQL installation, follow the appropriate steps in the data migration guide. For more, see Migrating Data from Earlier Versions of Xpress Insight Server.

© 2001-2021 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.