aboutsummaryrefslogtreecommitdiffstats
path: root/ops/robust-psql.md
diff options
context:
space:
mode:
Diffstat (limited to 'ops/robust-psql.md')
-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