In today’s article, we will be implementing the Patch process in the PostgreSQL database.
Patching the PostgreSQL database is easier than other databases.
We can upgrade the version to the latest minor patch version with a single command.
The current version of our Database is 13.4.
A backup of the database is taken before patching.
After the backup is taken, the database is closed.
1 2 3 |
$ pg_basebackup -U postgres -D /var/lib/pgsql/backup/postgre_13.4.tar.gz $ pg_ctl stop -D /var/lib/pgsql/13/data |
PostgreSQL version is upgraded with the following command.
1 |
$ yum update postgresql13 |
The patching process was completed successfully.
We open the database and check the version.
1 2 3 |
$ /usr/pgsql-13/bin/pg_ctl start -D /var/lib/pgsql/13/data $ pgsql select version(); |
Database version upgraded from 13.4 to 13.12.