Initializing help system before first use

Upgrading to PostgreSQL 12

This topic contains the steps to upgrade your Red Hat Enterprise Linux database to PostgreSQL 12.17.
If you are migrating to PostgreSQL 12 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.
  1. Make sure PostgreSQL 9.5 is running.
    sudo 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. Specify the server_encoding and lc_collate in the initdb command. For example (assuming default data directory , encoding and locale):
    sudo -u postgres /usr/pgsql-12/bin/initdb --locale en_US.UTF-8 --encoding UTF8 /var/lib/pgsql/12/data
  4. Stop the older version of PostgreSQL.
    sudo systemctl stop postgresql-X.X
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-12/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-2024 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.