PostgreSQL 11 Administration Cookbook
by Simon Riggs, Gianni Ciolli, Sudheer Kumar Meesala, Sheldon Strauch
How to do it…
The rest of this recipe assumes that you have enabled hot_standby. This is not an absolute requirement, but it makes things much, much easier.
Both repmgr and pgpool provide replication monitoring facilities. Munin plugins are available for graphing replication and apply delay.
Replication works by processing the WAL transaction log on other servers. You can think of WAL as a single, serialized stream of messages. Each message in the WAL is identified by an 8-byte integer known as a log sequence number (LSN). For historical reasons, we show this as two separate hex numbers; for example, the LSN value X is shown as XXXX/YYYY.
You can compare any two LSNs using pg_wal_lsn_diff(). In some places, prior to PostgreSQL 10, an LSN ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access