diff options
-rwxr-xr-x | scripts/checkPostgreSQLrepl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/checkPostgreSQLrepl b/scripts/checkPostgreSQLrepl index 6558cf3..20b74fe 100755 --- a/scripts/checkPostgreSQLrepl +++ b/scripts/checkPostgreSQLrepl @@ -1,5 +1,5 @@ #!/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 +CHECKSQL="SELECT application_name AS name, COALESCE(client_hostname, CAST(client_addr AS TEXT)) AS client, state, sync_state AS type, pg_wal_lsn_diff(sent_lsn, replay_lsn) AS lag FROM pg_stat_replication" +echo "$CHECKSQL" | psql -U postgres -h firebrand +echo "$CHECKSQL" | psql -U postgres -h defiant |