From 8140ba9c278c44c76ff4644356bdc6e5b78e1dbb Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 6 May 2016 17:34:46 -0300 Subject: [PATCH] The commit fixes problems not taking in account while working on the issue with rsync returning non-zero status on vanishing files on commit 83e5f981711c0675c0c5b275eb8326ede86ff2f5. Alvaro Herrera gave me some tips which pointed me in the correct direction. This was reported by sungjae lee --- repmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repmgr.c b/repmgr.c index aeb3cb6e..87443ccc 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1665,7 +1665,7 @@ do_standby_clone(void) It's quite common for this to happen on the data directory, particularly with long running rsync on a busy server. */ - if (r != 0 && r != 24) + if (!WIFEXITED(r) && WEXITSTATUS(r) != 24) { log_warning(_("standby clone: failed copying master data directory '%s'\n"), master_data_directory); @@ -1751,7 +1751,7 @@ do_standby_clone(void) It's quite common for this to happen on the data directory, particularly with long running rsync on a busy server. */ - if (r != 0 && r != 24) + if (!WIFEXITED(r) && WEXITSTATUS(r) != 24) { log_warning(_("standby clone: failed copying tablespace directory '%s'\n"), tblspc_dir_src.data);