
- UBUNTU POSTGRESQL CLIENT 13 HOW TO
- UBUNTU POSTGRESQL CLIENT 13 INSTALL
- UBUNTU POSTGRESQL CLIENT 13 UPGRADE
The data directory where all the database clusters will be stored at: /var/lib/postgresql/9.3/mainĪnd the configuration file at: /etc/postgresql/9.3/main/nf
UBUNTU POSTGRESQL CLIENT 13 INSTALL
These steps for will also work for example upgrading version 13 to version 14.When you install postgresql on 14.04, it sticks the main server program postgres at: /usr/lib/postgresql/9.3/bin/postgres
UBUNTU POSTGRESQL CLIENT 13 UPGRADE
Sudo apt-get purge postgresql-12 postgresql-client-12 Conclusionīy following these steps you should be able to upgrade your existing PostgreSQL version 12 cluster to version 13. When everything is running fine we can delete the version 12 “main” cluster and remove the PostgreSQL version 12 packages sudo pg_dropcluster 12 main sudo pg_lsclustersġ2 main 5433 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.logġ3 main 5432 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log With the pg_lsclusters command we can verify the status of the clusters. Now we can upgrade the “main” cluster from version 12 to version 13 with the pg_upgradecluster command. We will need to drop this cluster with the pg_dropcluster command.

When trying to upgrade our “main” version 12 it will clash with the existing version 13 “main”. Out of the box the PostgreSQL version 13 cluster “main” is created at installation. Ver Cluster Port Status Owner Data directory Log fileġ2 main 5432 online postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.logġ3 main 5433 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log This should show both clusters online sudo pg_lsclusters Now that have both version 12 and 13 installed we can begin with updating the existing PostgreSQL cluster.įirst we check the status of the clusters with the pg_clusters command. Postgresql-client-13 13.2-1 amd64 front-end programs for PostgreSQL 13 Postgresql-client 13+225ubuntu1 all front-end programs for PostgreSQL (supported version) Postgresql-13 13.2-1 amd64 The World`s Most Advanced Open Source Relational Database Postgresql 13+225ubuntu1 all object-relational SQL database (supported version) Running the same dpkg command we used earlier it will now show both PostgreSQL version 12 and 13. Sudo apt install postgresql-13 postgresql-client-13 # Install PostgreSQL server and client version 13 # Always start with updating your system. Read through the offical PostgreSQL documentation here if the postgresql-13 version is not available. Before we can upgrade the existing clusters we need ton install a new version of PostgreSQL. PostgreSQL allows for multiple versions to coexist on the same system. Postgresql-common 225ubuntu1 all PostgreSQL database-cluster managerĪs you can see only PostgreSQL version 12 is installed on this system. Postgresql-client-common 225ubuntu1 all manager for multiple PostgreSQL client versions Postgresql-client-12 12.6-0ubuntu0.20.10.1 amd64 front-end programs for PostgreSQL 12 Postgresql-12 12.6-0ubuntu0.20.10.1 amd64 object-relational SQL database, version 12 server

To see the supported PostgreSQL versions check the offical website. To check the installed versions we will use the dpkg command. This example is based on Debian or Ubuntu based systems. Checking the current PostgreSQL versionįirst we need to check which current versions of PostgreSQL are installed.

Before upgrading to the new Ubuntu version you should upgrade your PostgreSQL. For example on the new Ubuntu 22.04 LTS version you get a message that PostgreSQL version 12 is obsolete.

UBUNTU POSTGRESQL CLIENT 13 HOW TO
In this guide I will explain how to upgrade postgresql to a new version.
