Replication and Replication Slot Metrics
The Replication metrics group provides details on:
- Current LSN
- LSN Received
- Which nodes are Replicas
- Replication status
- Replication Lag
The Replication Slot metrics group provides details on:
- Last LSN Sent to each replica
Current LSN & Last LSN Received
Current LSN
The Log Sequence Number (LSN) indicates the insert position of transactions in the Write Ahead Log (WAL). The Current LSN metric shows the position of the latest transaction for the cluster.
LSN Received
Shows the latest LSN received by each replica in the cluster. Ideally, this value should closely follow the Current LSN metric.
Replica Nodes
Provides historical data on which nodes are acting as replicas. A value of “1” indicates that a node is a replica, whereas a value of “0” indicates that the node is not in recovery mode (e.g. it may be acting as the master).
Last LSN Sent
Provides historical data on the last transaction sent by the master to a replica. Ideally, this should closely follow the Current LSN metric.
For further details, see the official documentation.
Replication Lag
Replication lag in bytes
Displays the current replication lag in bytes between a specific replica node and the master node. It is calculated from the difference between last flushed LSN and current LSN of the master node.
Replication lag in milliseconds
Displays the current replication lag in milliseconds between a specific replica node and the master node. This represents the time elapsed between flushing recent WAL locally on the master node and receiving notification that this replica node has written and flushed, but not applied it.
For further information on replication lag in PostgreSQL, see the official documentation.
Replay Lag
Replay lag in bytes
Displays the current replay lag in bytes between a specific replica node and the master node. It is calculated from the difference between last replayed LSN and current LSN of the master node.
Replay lag in milliseconds
Displays the current replay lag in milliseconds between a specific replica node and the master node. This represents the time elapsed between flushing recent WAL locally on the master node and receiving notification that this replica node has written, flushed and applied it.
For further information on replay lag in PostgreSQL, see the official documentation.
Replication Status
Provides historical data on if the replica node(s) are streaming. A value of “1” indicates that a replica node’s replication status is streaming, whereas a value of “0” indicates otherwise. Our support team will be notified if there are any issues with replication, and they will investigate and rectify the issue.