mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 17:01:17 +02:00
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
This commit is contained in:
parent
2ab23445bc
commit
6e52209eb1
@ -38,7 +38,7 @@ static void createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli,
|
|||||||
static void digestControlFile(ControlFileData *ControlFile, char *source,
|
static void digestControlFile(ControlFileData *ControlFile, char *source,
|
||||||
size_t size);
|
size_t size);
|
||||||
static void updateControlFile(ControlFileData *ControlFile);
|
static void updateControlFile(ControlFileData *ControlFile);
|
||||||
static void syncTargetDirectory(const char *argv0);
|
static void syncTargetDirectory(void);
|
||||||
static void sanityChecks(void);
|
static void sanityChecks(void);
|
||||||
static void findCommonAncestorTimeline(XLogRecPtr *recptr, int *tliIndex);
|
static void findCommonAncestorTimeline(XLogRecPtr *recptr, int *tliIndex);
|
||||||
|
|
||||||
@ -380,7 +380,7 @@ main(int argc, char **argv)
|
|||||||
updateControlFile(&ControlFile_new);
|
updateControlFile(&ControlFile_new);
|
||||||
|
|
||||||
pg_log(PG_PROGRESS, "syncing target data directory\n");
|
pg_log(PG_PROGRESS, "syncing target data directory\n");
|
||||||
syncTargetDirectory(argv[0]);
|
syncTargetDirectory();
|
||||||
|
|
||||||
printf(_("Done!\n"));
|
printf(_("Done!\n"));
|
||||||
|
|
||||||
@ -715,7 +715,7 @@ updateControlFile(ControlFileData *ControlFile)
|
|||||||
* the overall amount of IO noticeably.
|
* the overall amount of IO noticeably.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
syncTargetDirectory(const char *argv0)
|
syncTargetDirectory(void)
|
||||||
{
|
{
|
||||||
if (!do_sync || dry_run)
|
if (!do_sync || dry_run)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user