Every 3 months, the PostgreSQL community releases minor version updates that are available for all the supported PostgreSQL versions. Let's say that we are using PostgreSQL 13.1 but a new minor version, PostgreSQL 13.2, has been released. In this recipe, we shall see how a minor version upgrade can be performed when using PostgreSQL 13.
Getting ready
In order to perform a minor version PostgreSQL 13 update, we should have a database server with an already-running PostgreSQL 13 cluster. To use yum or apt, we should have the yum or apt repository configured.
How to do it...
We will do this using the following steps:
- Shut down the PostgreSQL cluster:
$ /usr/pgsql-13/bin/pg_ctl -D /var/lib/pgsql/13/data stop -mf
- Get all the Postgres packages installed in the existing PostgreSQL server:
$ rpm -qa | grep postgres
postgresql13-13.1-3PGDG.rhel7.x86_64
postgresql13-server-13.1-3PGDG.rhel7.x86_64
postgresql13-libs-13.1-3PGDG.rhel7.x86_64
postgresql13...