static void check_replication_time_lag(void)
{
int i;
+ int active_nodes = 0;
POOL_STATUS sts;
POOL_SELECT_RESULT *res;
unsigned long long int lsn[MAX_NUM_BACKENDS];
return;
}
+ /* Count healthy nodes */
+ for (i=0;i<NUM_BACKENDS;i++)
+ {
+ if (VALID_BACKEND(i))
+ active_nodes++;
+ }
+
+ if (active_nodes <= 1)
+ {
+ /* If there's only one or less active node, there's no point
+ * to do checking */
+ return;
+ }
+
for (i=0;i<NUM_BACKENDS;i++)
{
if (!VALID_BACKEND(i))