Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions heartbeat/pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,10 @@ pgsql_real_start() {
check_stat_temp_directory

if [ "$OCF_RESKEY_rep_mode" = "slave" ]; then
if ! mkdir -p $OCF_RESKEY_tmpdir || ! chown $OCF_RESKEY_pgdba $OCF_RESKEY_tmpdir || ! chmod 700 $OCF_RESKEY_tmpdir; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the description in the metadata you can probably move this to the beginning of pgsql_start().

Maybe the metadata needs updating as well, as it sounds like it's not optional for replication anymore.

ocf_exit_reason "Can't create directory $OCF_RESKEY_tmpdir or it is not readable by $OCF_RESKEY_pgdba"
return $OCF_ERR_PERM
fi
rm -f $RECOVERY_CONF
make_recovery_conf || return $OCF_ERR_GENERIC
fi
Expand Down