Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2e3b31

Browse files
committed
Fix --dry-run mode of pg_rewind
Even if --dry-run mode was specified, the control file was gettingupdated, preventing follow-up runs of pg_rewind to work properly on thetarget data folder. The origin of the problem came from the refactoringdone byce6afc6.Author: Alexey KondratovDiscussion:https://postgr.es/m/7ca88204-3e0b-2f4c-c8af-acadc4b266e5@postgrespro.ruBackpatch-through: 12
1 parent8381242 commitc2e3b31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/pg_rewind/pg_rewind.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,8 @@ main(int argc, char **argv)
388388
ControlFile_new.minRecoveryPoint=endrec;
389389
ControlFile_new.minRecoveryPointTLI=endtli;
390390
ControlFile_new.state=DB_IN_ARCHIVE_RECOVERY;
391-
update_controlfile(datadir_target,&ControlFile_new,do_sync);
391+
if (!dry_run)
392+
update_controlfile(datadir_target,&ControlFile_new,do_sync);
392393

393394
if (showprogress)
394395
pg_log_info("syncing target data directory");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp