How To Upgrade POSTGRESQL 10 To 11

We will upgrade POSTGRESQL 10 To 11 on CENTOS in this article. Before I begin the redesign procedure, I need to make the accompanying basic cautioning:

You should re-arrange your postgresql.conf and pg_hba.conf records. Since the files will be reset after the redesign.


Install PostgreSQL 11

Postgresql 11 we are installing the following script.


We are performing the initdb task in the Postgresql 11 database.

Checking Whether the Upgrade is Applicable


We check the applicability of the upgrade with the command below. (with PostgreSQL user)

Stop PostgreSQL 10

If we perform the upgrade without stopping Postgresql 10, we get the following error.

We are ceasing Postgresql 10 (with root user)


At that point, we change to the Postgres client and run the upgrade command. (with Postgres user)

We use the following commands before loading the requested commands.

Then we do the desired steps from us.

Delete Old Cluster

Then run the below command. But, be aware that this command deletes the old cluster. That’s why to be sure that PostgreSQL 11 is working before deleting the old cluster.

We remove all packages related to Postgresql10. (with root user)

The update process is finished. Now you can connect to the database and look at version 11.