File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1988,6 +1988,15 @@ validate_ocf_check_level_10() {
19881988 ocf_exit_reason " Replication(rep_mode=slave) does not support Master/Slave configuration."
19891989 return $OCF_ERR_CONFIGURED
19901990 fi
1991+ # For slave mode in PostgreSQL 12 and later, create the tmp directory to place recovery.conf.
1992+ ocf_version_cmp " $version " " 12"
1993+ rc=$?
1994+ if [ $rc -eq 1 ]|| [ $rc -eq 2 ]; then # PosrgreSQL 12 or later.
1995+ if ! mkdir -p $OCF_RESKEY_tmpdir || ! chown $OCF_RESKEY_pgdba $OCF_RESKEY_tmpdir || ! chmod 700 $OCF_RESKEY_tmpdir ; then
1996+ ocf_exit_reason " Can't create directory $OCF_RESKEY_tmpdir or it is not readable by $OCF_RESKEY_pgdba "
1997+ return $OCF_ERR_PERM
1998+ fi
1999+ fi
19912000 fi
19922001
19932002 if use_replication_slot; then
You can’t perform that action at this time.
0 commit comments