BDR Replication lag


Job details

Name: BDR Replication lag
Platform: Postgres
Category: Cluster
Description: Checks for BDR replication lag
Long description: Task analyses BDR replication lag
Version: 0.3
Default schedule: 0,10,20,30,40,50 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘postgres’]/.[hasengine=‘YES’ & replication_used > 0]

Parameters

Name Default value Description
keep data for 7 The number of days to keep the data for.
max lag bytes warning 1000000 Maximum lag bytes for warning
max lag bytes alarm 2000000 Maximum lag bytes for alarm

Job Summary

SELECT pg_xlog_location_diff(pg_current_xlog_insert_location(), flush_location) AS lag_bytes, pid, application_name, usesysid, client_addr, client_port, backend_start, state, sync_state, CURRENT_TIMESTAMP AS currtime FROM pg_stat_replication;

Detailed Description

The job operates by tracking the difference in log positions between the master and the replica (lag in bytes). It evaluates this data to determine if the lag exceeds predefined warning or alarm thresholds, which could indicate potential issues in the replication process.

Implementation Details

Dependencies

Reporting and Alerts

Impact and Importance