Hi,
> I think we would have to maintain two pointers one for the prefetch and one
> for the actual running. But the logic in for recovery is complex enough that
> I'm concerned about changing it enough to do that and whether it can be done
> without uglifying the code quite a bit.
Yes, this is what the code is doing. Prefetch function returns LSN
where prefetch was performed. Redo routine has to call prefetch if
it is going to read WAL record beyond this.
--
------
Koichi Suzuki