From 78aea00a6d8022866026cc3b630529f15338a994 Mon Sep 17 00:00:00 2001 From: Jaime Casanova Date: Wed, 11 Apr 2012 10:34:38 -0500 Subject: [PATCH] Avoid to show what segments are needed for this backup if the rsync failed --- repmgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/repmgr.c b/repmgr.c index cab0cfac..489e69ed 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1066,8 +1066,10 @@ stop_backup: } last_wal_segment = PQgetvalue(res, 0, 0); - log_info(_("%s requires primary to keep WAL files %s until at least %s\n"), - progname, first_wal_segment, last_wal_segment); + /* don't show this message if rsync failed */ + if (r == 0) + log_info(_("%s requires primary to keep WAL files %s until at least %s\n"), + progname, first_wal_segment, last_wal_segment); /* Finished with the database connection now */ PQclear(res);