Forum Powercut Exercise 2017

A parent topic for those who want to share their findings from the Forum Powercut Exercise 24/11/2017

RAT Unit Notes

Very little action needed to be taken by RAT - a 'wait and see' approach to the more critical servers in the basement was sufficient.

It was hard to discern if certain database servers' replication slaves were up-to-date so RAT have updated the pg-activity tool to include replication slave data (in addition to replication master that it already provides).

$ cos/utils/pg-activity r
 app | usename | state | sync_state |     last_tx_replay     
     |         |       |            | 2017-11-29 13:36:07+00
(1 row)

 13:37:09 up 48 days,  9:13,  1 user,  load average: 0.01, 0.04, 0.05
[[ also: 'a' for all sessions; 'l[l]' for long format; 'r' for replication ]]

The command just outputs date_trunc('second',pg_last_xact_replay_timestamp()))) ) AS last_tx_replay; which gives the time of the last streaming transaction replay.

We also noted that, when PostgreSQL 10 client libraries roll out to our web services, we'll take advantage of the ability to specify fallback connect strings to use readonly slaves automatically in such a scenario.

-- NeilBrown - 24 Nov 2017

Topic revision: r2 - 29 Nov 2017 - 13:42:54 - GrahamDutton
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies