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

Commit29917e3

Browse files
committed
fix for < Pg13
1 parentd582627 commit29917e3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/parsexlog.c‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,7 @@ read_recovery_info(const char *archivedir, TimeLineID tli, uint32 wal_seg_size,
573573
{
574574
XLogRecPtrerrptr;
575575

576-
//errptr = startpoint ? startpoint : xlogreader->EndRecPtr;
577-
errptr=curpoint;
576+
errptr=xlogreader->ReadRecPtr;
578577

579578
if (errormsg)
580579
elog(ERROR,"Could not read WAL record at %X/%X: %s",
@@ -585,7 +584,11 @@ read_recovery_info(const char *archivedir, TimeLineID tli, uint32 wal_seg_size,
585584
(uint32) (errptr >>32), (uint32) (errptr));
586585
}
587586

588-
curpoint=xlogreader->EndRecPtr;
587+
/*
588+
* Prior Pg13 we need to set it to continue.
589+
* After Pg13 it is ignored in WalReadRecord.
590+
*/
591+
curpoint=InvalidXLogRecPtr;
589592

590593
if (getRecordTimestamp(xlogreader,&last_time))
591594
{
@@ -594,12 +597,13 @@ read_recovery_info(const char *archivedir, TimeLineID tli, uint32 wal_seg_size,
594597
/* Found timestamp in WAL record 'record' */
595598
res= true;
596599
}
597-
}while (curpoint <=endpoint);
600+
}while (xlogreader->EndRecPtr<endpoint+1);
598601

599602
if (res)
600603
gotocleanup;
601604

602605
/* goto previous segment */
606+
endpoint=endpoint- (endpoint %wal_seg_size)-1;
603607
startpoint-=wal_seg_size;
604608
}while (startpoint+wal_seg_size>start_lsn);
605609

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp