Hi, I am a PostgreSQL enthusiast learner and I have a question about upgrade steps.
For Example: 1) one major version to another and you do have replication between whether the nodes at same datacenter or different data centers?
- Let’s say you have a database that you push that is currently configured with replication. So it’s part of the cluster, yeah. And you’re going to upgrade the major version from X to Y. Let’s say you’re going from 13 to 15, whatever that might be. What considerations do we need to take to minimize the impact to the cluster?
I want to know what the best practices are to follow when upgrading PostgreSQL. , Reference links or steps that will be helpful. Thank you in advance.
Hi,
The ideal upgrade is to use the CLI pg_upgrade with the hard link option as it is the simplest and for most situations the quickest. That being said these issues are to be kept in mind:
-
Draining application connections: Prior to all upgrades you will need to “cut” off communications between the deprecated server and application clients. Otherwise, you risk losing important data.
-
Upgrading REPLICAs: I suggest you review the documentation here and read up on how rsync is used.
-
Overall Downtime: Like it or not, you’re going to have to schedule downtime. How much time is really dependent upon the architecture and what I will call “runbook” discipline.
Percona Blog References:
Hope this helps
Robert
Thank you for your time and assistance. I appreciate your response and the resources you provided, Rob. They will be helpful for my reference.
Hi,
I’m glad I could help
1 Like