O'Reilly logo

PostgreSQL Cookbook by Chitij Chauhan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the pg_upgrade utility for a version upgrade

Here, in this recipe, we are going to talk about upgrading a PostgreSQL cluster using pg_upgrade utility. We will be covering a PostgreSQL version upgrade from version 9.2 to version 9.3.

Getting ready

The only prerequisites here, are that an existing PostgreSQL cluster must be set up and running. The required version here is PostgreSQL version 9.2. These steps are carried out on a 64 bit CentOS machine.

How to do it...

The following are the steps to upgrade a PostgreSQL cluster from version 9.2 to version 9.3 using the pg_upgrade utility:

  1. Take a full backup of the data directory using a filesystem dump or use pg_dumpall to backup data. Before taking a backup stop the running PostgreSQL server.
    pg_ctl ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required