How to handle the required PostgreSQL upgrade from 11.5 to 14.3 for Clarity 16.0.3
search cancel

How to handle the required PostgreSQL upgrade from 11.5 to 14.3 for Clarity 16.0.3


Article ID: 249341


Updated On:


Clarity PPM On Premise


You are planning to upgrade Clarity to 16.0.3.  With the requirements, you will also need to also upgrade your PostgreSQL from 11.5 to 14.3. 


Release : 16.0.3

Component : Clarity Install / Upgrade


With Clarity 16.0.3, an upgrade of Postgres is also required


These steps are provided as an example and as a high level summary. Please plan your upgrade to consider the needed hardware, software and infrastructure.

You may perform these steps AFTER the Clarity upgrade

Backup database on Postgres 11

As the postgres user:

bash-4.2$ /usr/pgsql-11/bin/pg_dump clarity --file=clarity.bak --format=t

Copy the "clarity.back" to the postgres 14 server.

Install postgres 14 on the new server

sudo yum -y install
sudo yum repolist -y
sudo yum update -y
sudo reboot now
sudo yum install -y postgresql14-server postgresql14
sudo rpm -qi postgresql14-server postgresql14

sudo yum install -y postgresql-contrib

As an alternative to using yum, you can use rpm to install the postgres packages
on the Clarity 16.0.3 3rd party ISO download:


sudo /usr/pgsql-14/bin/postgresql-14-setup initdb
sudo systemctl enable --now postgresql-14
sudo systemctl status postgresql-14
sudo su - postgres

and as the postgres user:

   postgres=# alter user postgres with password 'PostgresStrongPassword#';
The final step you need to perform to set up the database is to change the Host authentication from ident to md 5. 
This enables password-based authentication from the Clarity server to the PostgreSQL database. 
To update the authentication, navigate to the /var/lib/pgsql/14/data/pg_hba.conf file and change ident parameter to md5.

Original Value
host    all             all               ident

Updated Value
host    all             all               md5

Add one more line at the bottom of the file to enable remote connections.
host    all             all               md5

If you have installed Clarity and PostgreSQL on the same server, please update the following line in the pg_hba.conf file.

host    all             all             ::1/128                 ident

host    all             all             ::1/128                 md5

Modify the /var/lib/pgsql/11/data/postgresql.conf file and change the listen_addresses = 'localhost' to listen_addresses = '*'.

For example:


Restore database from the Postgres 11 server on to the Postgres 14 server

On the Postgres 14 server


su - postgres
mkdir /var/lib/pgsql/14/tablespaces/yourtablespacename

--in this example, my database name is my user is 'clarity' and my database name is 'clarity'
create role clarity password 'niku' login nosuperuser nocreatedb nocreaterole connection limit -1;
create tablespace clarity_data owner claritylocation '/var/lib/pgsql/14/tablespaces/customername';
create database clarity owner clarity tablespace clarity_data connection limit -1; 

psql -d clarity
|--> create schema clarity authorization clarity;
pg_restore -F t /var/lib/pgsql/14/backups/clarity.bak -U postgres -d clarity --role clarity --no-owner --verbose --no-tablespaces --schema "clarity"

Repeat the steps above for the data warehouse

Update the NSA in clarity for the Database and Data Warehouse database information.


Update the jaspersoft Data Sources, from the clarity\bin\ folder: 

./admin update jasperParameters

Restart all Clarity Services: 

/opt/clarity/bin/service stop start all

Create the loopback link needed for stored procedures

/opt/clarity/bin/admin db create-db-link


Additional Information

Postgres documentation for upgrades

Clarity 16.0.3 documentation for Postgres setup