summaryrefslogtreecommitdiff
path: root/scripts/checkPostgreSQLrepl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-12-21 15:08:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-12-21 15:08:34 +0000
commitfa23a7489c1435749a3018fbef9be59ed3f97cc6 (patch)
tree9eab990f9c1eb2b6298419910248c2101c3a61ac /scripts/checkPostgreSQLrepl
parentFix update ACL (diff)
downloadconfig-fa23a7489c1435749a3018fbef9be59ed3f97cc6.tar.bz2
config-fa23a7489c1435749a3018fbef9be59ed3f97cc6.tar.xz
config-fa23a7489c1435749a3018fbef9be59ed3f97cc6.zip
Update to work with pglogical
Diffstat (limited to 'scripts/checkPostgreSQLrepl')
-rwxr-xr-xscripts/checkPostgreSQLrepl7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/checkPostgreSQLrepl b/scripts/checkPostgreSQLrepl
index 19e2615..6558cf3 100755
--- a/scripts/checkPostgreSQLrepl
+++ b/scripts/checkPostgreSQLrepl
@@ -1,2 +1,5 @@
-echo "select st_received as n, date_trunc('second', st_last_received_event_ts) as effective_db_time, date_trunc('second', st_last_received_ts) as last_heard_from, date_trunc('second', st_lag_time) as lagged_by from _gentoo.sl_status order by st_received;" | psql -Upostgres gentoo -hfirebrand
-echo "select st_received as n, date_trunc('second', st_last_received_event_ts) as effective_db_time, date_trunc('second', st_last_received_ts) as last_heard_from, date_trunc('second', st_lag_time) as lagged_by from _gentoo.sl_status order by st_received;" | psql -Upostgres gentoo -hdefiant
+#!/bin/bash
+
+CHECKSQL="SELECT ss.subscription_name, status, provider_node, provider_dsn FROM pglogical.subscription s, pglogical.show_subscription_status(s.sub_name) ss"
+echo "$CHECKSQL" | psql -U postgres p2pvr -h firebrand
+echo "$CHECKSQL" | psql -U postgres gentoobrowse -h defiant