if master check added

This commit is contained in:
Tommaso Piccioli 2021-09-17 17:56:29 +02:00
parent ac009a330a
commit 84b1c899ef
1 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,12 @@
#!/bin/bash
ISMASTER=`psql -t -c "SELECT pg_is_in_recovery();"`
if [ $ISMASTER != 'f' ]
then
echo "Not on master, nothing to do."
exit 0
fi
BASE_BACKUP_DIR={{ psql_base_backup_dir }}
WAL_ARCHIVES_LOG_DIR={{ psql_wal_archiving_log_dir }}
WAL_LATEST_BACKUP=