Near-Zero Downtime Automated Upgrades of PostgreSQL Clusters in Cloud

Gulcin Yildirim Jelinek

2ndQuadrant

Site Reliability Engineer

Инженер по надёжности компании 2nd Quadrant. Окончила таллинский университет Tehnikaülikool. Член совета директоров PostgreSQL Europe.

PostgreSQL major version upgrades means downtime in many cases. Keeping our databases healthy, secure, bug-free and highly-performant requires having up-to-date PostgreSQL versions. To make upgrades less painful, PostgreSQL Logical Replication can be used for upgrades, and minimum downtime can be achieved.

In her talk, Gulcin will explain the tool she wrote in Ansible to minimize downtime in major version upgrades of PostgreSQL clusters. The method involves two-step standby configuration and allows re-using of existing standbys as new standbys in the upgrade process. The whole procedure is automated and does not require any manual operation in the upgrade process or afterward.

She evaluated this method through two main use-cases: high availability cluster setup and heavy-read cluster setup, and performed benchmarks on both of the clusters. To give a meaningful comparison, she also used traditional upgrade methods such as pg_dump/pg_restore and pg_upgrade and the talk will reveal the results.