Add an ORDER BY to the slony_status check to account for cases in which
authorJeff Frost <[email protected]>
Tue, 18 Feb 2014 01:08:24 +0000 (20:08 -0500)
committerGreg Sabino Mullane <[email protected]>
Tue, 18 Feb 2014 01:08:24 +0000 (20:08 -0500)
there is more than one node in replication; we want to report on the
most lagged server.

check_postgres.pl

index fae344f665de79c0bd0714cb72c22c7d871db1aa..73a99c1e41a0ab34b0839482b99aab6e5aba8050 100755 (executable)
@@ -7421,7 +7421,8 @@ q{SELECT
  COALESCE(n2.no_comment, '') AS com2
 FROM SCHEMA.sl_status
 JOIN SCHEMA.sl_node n1 ON (n1.no_id=st_origin)
-JOIN SCHEMA.sl_node n2 ON (n2.no_id=st_received)};
+JOIN SCHEMA.sl_node n2 ON (n2.no_id=st_received)
+ORDER BY 1 DESC};
 
     my $maxlagtime = -1;