-
+
High Availability, Load Balancing, and Replication
Monitoring
- The WAL files required for the standby's recovery are not deleted from
- the pg_xlog> directory on the primary while the standby is
- connected. If the standby lags far behind the primary, many WAL files
- will accumulate in there, and can fill up the disk. It is therefore
- important to monitor the lag to ensure the health of the standby and
- to avoid disk full situations in the primary.
- You can calculate the lag by comparing the current WAL write
+ An important health indicator of streaming replication is the amount
+ of WAL records generated in the primary, but not yet applied in the
+ standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
pg_current_xlog_location> on the primary and the