From 6e52209eb1f830552a5ec220c2bfc3b517535837 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 26 Feb 2019 16:08:24 +0900 Subject: [PATCH] Simplify some code in pg_rewind when syncing target directory 9a4059d simplified the flush of target data folder when finishing processing, and could have done a bit more. Discussion: https://postgr.es/m/20190131064759.GA13429@paquier.xyz --- src/bin/pg_rewind/pg_rewind.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 7ccde5c87f..aa753bb315 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -38,7 +38,7 @@ static void createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli, static void digestControlFile(ControlFileData *ControlFile, char *source, size_t size); static void updateControlFile(ControlFileData *ControlFile); -static void syncTargetDirectory(const char *argv0); +static void syncTargetDirectory(void); static void sanityChecks(void); static void findCommonAncestorTimeline(XLogRecPtr *recptr, int *tliIndex); @@ -380,7 +380,7 @@ main(int argc, char **argv) updateControlFile(&ControlFile_new); pg_log(PG_PROGRESS, "syncing target data directory\n"); - syncTargetDirectory(argv[0]); + syncTargetDirectory(); printf(_("Done!\n")); @@ -715,7 +715,7 @@ updateControlFile(ControlFileData *ControlFile) * the overall amount of IO noticeably. */ static void -syncTargetDirectory(const char *argv0) +syncTargetDirectory(void) { if (!do_sync || dry_run) return;