Use this procedure to upgrade PostgreSQL 16 to PostgreSQL 18 after upgrading Compliance Manager Vault and Policy Agent to version 10.6.1.
- Back up all databases:
postgres pg_dumpall > all_databases_backup.sql - Refresh the package list on your Linux system as a root user:
sudo apt update - Install PostgreSQL 18:
sudo apt install -y postgresql-18postgresql-contrib-18 - Check the running PostgreSQL clusters:
pg_lsclustersThe expected setup is PostgreSQL 16
mainon port 5432 and PostgreSQL 18mainon an alternate port, typically 5433. - Link the Entrust library and extension files for PostgreSQL 18:
sudo ln -s /opt/hcs/lib/entrust_psql_extension_18.so /usr/lib/postgresql/18/lib/entrust_psql_extension.sosudo ln -s /usr/share/postgresql/16/extension/entrust_psql_extension.control /usr/share/postgresql/18/extension/sudo ln -s /usr/share/postgresql/16/extension/entrust_psql_extension--*.sql /usr/share/postgresql/18/extension/ - Upgrade the PostgreSQL 16 main cluster:
sudo pg_upgradecluster16main - In
psql, ensure the extension is installed:CREATE EXTENSION IF NOT EXISTS entrust_psql_extension; - Open the session:
select open_session('file:///opt/hcs/etc/psql.conf'); - Fetch the key again:
select get_key('masterkey') as handle \gset - Decrypt the data:
select name, decrypt_data(credit_card_details) fromnew;