> @@ -2036,8 +2035,8 @@ RestoreBlockImage(XLogReaderState *record, uint8
> block_id, char *page)
> char *ptr;
> PGAlignedBlock tmp;
>
> - if (block_id > record->record->max_block_id ||
> - !record->record->blocks[block_id].in_use)
> + if (block_id > XLogRecMaxBlockId(record) ||
> + !XLogRecGetBlock(record, block_id)->in_use)
>
> I thought these can also be rewrite to:
>
> if (!XLogRecHasBlockRef(record, block_id))
Oops, I missed that. New version is attached.
--
Yuhang Qiu