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

Commite8240db

Browse files
committed
Fix pg_rewind debug output to print the source timeline history
getTimelineHistory() is called twice, to read the source and thetarget timeline history files. However, the loop to print the filewith the --debug option used the wrong variable when dealing with thesource. As a result, the source's history was always printed as empty.Spotted while debugging bug #18575, but this does not fix that bug,just the debugging output. Backpatch to all supported versions.Discussion:https://www.postgresql.org/message-id/092dd515-b7b4-4fd0-8407-ceca2f02f6ec@iki.fi
1 parentee2997c commite8240db

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎src/bin/pg_rewind/pg_rewind.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,7 @@ getTimelineHistory(TimeLineID tli, bool is_source, int *nentries)
873873
pg_free(histfile);
874874
}
875875

876+
/* In debugging mode, print what we read */
876877
if (debug)
877878
{
878879
inti;
@@ -882,10 +883,7 @@ getTimelineHistory(TimeLineID tli, bool is_source, int *nentries)
882883
else
883884
pg_log_debug("Target timeline history:");
884885

885-
/*
886-
* Print the target timeline history.
887-
*/
888-
for (i=0;i<targetNentries;i++)
886+
for (i=0;i<*nentries;i++)
889887
{
890888
TimeLineHistoryEntry*entry;
891889

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp