Retrieve master connection info using "SHOW primary_conninfo" SQL query instead of parsing recovery.conf
This commit is contained in:
parent
747331a9ec
commit
a099e2f833
1 changed files with 3 additions and 3 deletions
|
@ -305,11 +305,11 @@ then
|
|||
debug "Last replayed LSN: $LAST_REPLAYED_LSN"
|
||||
|
||||
|
||||
# Get master connection information from recovery.conf file
|
||||
MASTER_CONN_INFOS=$( egrep '^ *primary_conninfo' $RECOVERY_CONF|sed "s/^ *primary_conninfo *= *\(.\+\) *$/\1/" )
|
||||
# Get master connection information from primary_conninfo configuration parameter
|
||||
MASTER_CONN_INFOS=$( psql_get "SHOW primary_conninfo" )
|
||||
if [ ! -n "$MASTER_CONN_INFOS" ]
|
||||
then
|
||||
echo "UNKNOWN: Can't retrieve master connection information form recovery.conf file"
|
||||
echo "UNKNOWN: Can't retrieve master connection information from primary_conninfo configuration parameter"
|
||||
exit 3
|
||||
fi
|
||||
debug "Master connection information: $MASTER_CONN_INFOS"
|
||||
|
|
Loading…
Reference in a new issue