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

Commit6f3823b

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 parent8e10405 commit6f3823b

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
@@ -435,7 +435,8 @@ main(int argc, char **argv)
435435
ControlFile_new.minRecoveryPoint=endrec;
436436
ControlFile_new.minRecoveryPointTLI=endtli;
437437
ControlFile_new.state=DB_IN_ARCHIVE_RECOVERY;
438-
update_controlfile(datadir_target,&ControlFile_new,do_sync);
438+
if (!dry_run)
439+
update_controlfile(datadir_target,&ControlFile_new,do_sync);
439440

440441
if (showprogress)
441442
pg_log_info("syncing target data directory");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp