A major version upgrade is the ultimate test of high availability for a database cluster service such as PostgreSQL. This process has advanced drastically since the early days. Consider the procedure required for some older versions:
- 6.5 – 8.2: dump and restore all databases
- 8.3 – 8.4: pg_migrator
- 9.0: pg_upgrade
Beginning with PostgreSQL 9.4 and the addition of logical replication, it became possible to leverage this process to upgrade to any future version without stopping the database service. However, the steps necessary to complete such an upgrade are non-trivial and utilize tools that are not officially provided by the standard community release.
That makes it important for us to explain how zero-downtime upgrades work. Perhaps more often than many will admit, upgrades are postponed to avoid costly downtime for extremely active database...