if master check added #2

Merged
adellam merged 1 commits from tpiccioli/ansible-role-postgresql:master into master 2021-09-17 23:28:48 +02:00
1 changed files with 7 additions and 0 deletions
Showing only changes of commit 84b1c899ef - Show all commits

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=