diff --git a/pg_monz/usr-local-bin/pgsql_standby.sh b/pg_monz/usr-local-bin/pgsql_standby.sh index 4e57775..3c0f9f3 100755 --- a/pg_monz/usr-local-bin/pgsql_standby.sh +++ b/pg_monz/usr-local-bin/pgsql_standby.sh @@ -5,5 +5,5 @@ PGSHELL_CONFDIR="$1" # Load the psql connection option parameters. source $PGSHELL_CONFDIR/pgsql_funcs.conf -result=$(psql -A -t -h $PGHOST -p $PGPORT -U $PGROLE -d $PGDATABASE -c "select pg_is_in_recovery()::int" 2>&1) +result=$(psql -A -t -h $PGSTANDBY -p $PGPORT -U $PGROLE -d $PGDATABASE -c "select pg_is_in_recovery()::int" 2>&1) echo "$result" diff --git a/pg_monz/usr-local-etc/pgsql_funcs.conf b/pg_monz/usr-local-etc/pgsql_funcs.conf index 96fc91c..6b24eb2 100644 --- a/pg_monz/usr-local-etc/pgsql_funcs.conf +++ b/pg_monz/usr-local-etc/pgsql_funcs.conf @@ -2,3 +2,4 @@ PGHOST=127.0.0.1 PGPORT=5432 PGROLE=postgres PGDATABASE=postgres +PGSTANDBY=standby_host \ No newline at end of file