@@ -260,7 +260,7 @@ doExtractPageMap(void *arg)
260260
261261 XLByteToSeg (xlogreader -> EndRecPtr , nextSegNo );
262262 } while (nextSegNo <= extract_arg -> endSegNo &&
263- xlogreader -> EndRecPtr < extract_arg -> endpoint );
263+ xlogreader -> ReadRecPtr < extract_arg -> endpoint );
264264
265265 CleanupXLogPageRead (xlogreader );
266266 XLogReaderFree (xlogreader );
@@ -274,15 +274,12 @@ doExtractPageMap(void *arg)
274274 * Read WAL from the archive directory, from 'startpoint' to 'endpoint' on the
275275 * given timeline. Collect data blocks touched by the WAL records into a page map.
276276 *
277- * If **prev_segno** is true then read all segments up to **endpoint** segment
278- * minus one. Else read all segments up to **endpoint** segment.
279- *
280277 * Pagemap extracting is processed using threads. Eeach thread reads single WAL
281278 * file.
282279 */
283280void
284281extractPageMap (const char * archivedir , XLogRecPtr startpoint , TimeLineID tli ,
285- XLogRecPtr endpoint , bool prev_seg , parray * files )
282+ XLogRecPtr endpoint , parray * files )
286283{
287284 int i ;
288285 int threads_need = 0 ;
@@ -303,8 +300,6 @@ extractPageMap(const char *archivedir, XLogRecPtr startpoint, TimeLineID tli,
303300 (uint32 ) (endpoint >> 32 ), (uint32 ) (endpoint ));
304301
305302 XLByteToSeg (endpoint , endSegNo );
306- if (prev_seg )
307- endSegNo -- ;
308303
309304 nextSegNoToRead = 0 ;
310305 time (& start_time );
0 commit comments