diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkPostgreSQLrepl | 7 |
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 |