aboutsummaryrefslogtreecommitdiffstats
path: root/ops
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-07-01 12:47:49 -0400
committerDrew DeVault <sir@cmpwn.com>2020-07-01 12:47:49 -0400
commit6c216aea194e8cf6b4aefaf993886635f6fec04e (patch)
treee73486fd61abefeaaf25e0cf09b8b67da249dbb7 /ops
parente428cd2445fef7404cdec3fbf9257ce1d8e39b7a (diff)
downloadsr.ht-docs-6c216aea194e8cf6b4aefaf993886635f6fec04e.tar.gz
Improve the upgrade procedures
Diffstat (limited to 'ops')
-rw-r--r--ops/robust-psql.md16
1 files changed, 10 insertions, 6 deletions
diff --git a/ops/robust-psql.md b/ops/robust-psql.md
index b378bf8..3156b0a 100644
--- a/ops/robust-psql.md
+++ b/ops/robust-psql.md
@@ -167,6 +167,7 @@ done
# Standby promotion procedure (read/write mode)
1. Prerequisite: complete the read-only failover procedure
+1. Sanity check the application connection to the standby
1. Shut off the master
1. Run `pg_ctl promote` on the standby
@@ -197,13 +198,15 @@ The old master is now the standby, and the old standby is now the master.
## Minor version upgrades
-This process will incur a short service degredation. The services will be in
-read-only mode for up to 10 minutes.
+This procedure will incur up to a few minutes of downtime, but ideally the
+outage can only last as little as a few seconds.
-1. Complete the failover procedure
-1. Perform the upgrade and restart the postgresql daemon
-1. Reverse the failover procedure
-1. Upgrade the standby and restart the standby
+1. Complete the standby promotion procedure
+1. Upgrade the master, then complete the master demotion procedure
+
+At this point, the master has become the standby and is now up-to-date. Repeat
+the process again to upgrade the new standby and return the master/standby
+assignments to normal.
✗ TODO: Test this process
@@ -213,6 +216,7 @@ This process will incur a longer service degredation. The services will be in
read-only mode for up to 30 minutes.
1. Complete the failover procedure
+1. Stop replication on the standby: `select pg_xlog_replay_pause()`
1. Perform the upgrade and reboot the host
1. Sanity check the database
1. Reverse the failover procedure