Refactor per-page logic common to all redo routines to a new function.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: f8f4227976a2cdb8ac7c611e49da03aa9e65e0d2
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2014-09-02T12:10:28Z
Releases: 9.5.0
Refactor per-page logic common to all redo routines to a new function.

Every redo routine uses the same idiom to determine what to do to a page:
check if there's a backup block for it, and if not read, the buffer if the
block exists, and check its LSN. Refactor that into a common function,
XLogReadBufferForRedo, making all the redo routines shorter and more
readable.

This has no user-visible effect, and makes no changes to the WAL format.

Reviewed by Andres Freund, Alvaro Herrera, Michael Paquier.

Files