Content-Length: 262185 | pFad | http://github.com/postgrespro/postgres_cluster/commit/6f3823b03560589157d9dbdab623f603ef393d7c

80 Fix --dry-run mode of pg_rewind · postgrespro/postgres_cluster@6f3823b · GitHub
Skip to content

Commit 6f3823b

Browse files
committed
Fix --dry-run mode of pg_rewind
Even if --dry-run mode was specified, the control file was getting updated, preventing follow-up runs of pg_rewind to work properly on the target data folder. The origen of the problem came from the refactoring done by ce6afc6. Author: Alexey Kondratov Discussion: https://postgr.es/m/7ca88204-3e0b-2f4c-c8af-acadc4b266e5@postgrespro.ru Backpatch-through: 12
1 parent 8e10405 commit 6f3823b

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/6f3823b03560589157d9dbdab623f603ef393d7c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy