PostgreSQL Database Major Upgrade

Hello Guys...
In this post we are going to see PostgreSQL database major upgrade.
The earlier version of PostgreSQL is 9.6.5 and we are going to upgrade it to 10.1
Prerequisite:
  • A server with any flavour of UNIX having PostgreSQL 9.6.5 installed.
  • Binaries of PostgreSQL 10.1
  • Access to special OS user using database is installed. Here we are using postgres user as special OS user. postgres used for below execution.
Configuration Details:
  • Old data directory: /pg_data/pg_data_9.6.5/
  • New data directory: /pg_data/pg_data_10.1/
  • Old installation directory: /pghome/postgres_9.6.5/
  • New Installation directory: /pghome/postgres_10.1/
Upgrade Procedure:
  • backup database cluster.
  • shutdown database cluster.
  • Rename installation directory. It is good practise to rename installation directory instead of delete, if we have any trouble we can revert the changes.
  • Install PostgreSQL 10.1 using source code. I am going to write post for Standard PostgreSQL Database Installation.
  • Create database cluster using newly installed PostgreSQL. Execute this command using special OS user (postgres)
  • Restore old configuration files
  • Start database server using below command. Execute command using special OS user (postgres).
  • Restore data from backup. Execute this command using special OS user (postgres)
#############################!!! Happy Learning !!!##################################
References:
https://www.postgresql.org/docs/current/static/upgrading.html

Comments

Popular posts from this blog

Oracle RAC Database QUIESCE Mode

OMS 13c Port Requirement

PostgreSQL pg_controldata utility