From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Refactor per-page logic common to all redo routines to a new fun |
Date: | 2014-09-02 12:20:38 |
Message-ID: | E1XOn4g-00005Q-RA@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/f8f4227976a2cdb8ac7c611e49da03aa9e65e0d2
Modified Files
--------------
src/backend/access/gin/ginxlog.c | 234 +++----
src/backend/access/gist/gistxlog.c | 179 +++---
src/backend/access/heap/heapam.c | 1060 ++++++++++++++------------------
src/backend/access/nbtree/nbtxlog.c | 477 ++++++--------
src/backend/access/spgist/spgxlog.c | 883 ++++++++++++--------------
src/backend/access/transam/README | 66 +-
src/backend/access/transam/xlogutils.c | 81 +++
src/include/access/xlogutils.h | 23 +-
8 files changed, 1347 insertions(+), 1656 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-09-02 13:00:29 | pgsql: Check number of parameters in RAISE statement at compile time. |
Previous Message | Heikki Linnakangas | 2014-09-02 11:26:51 | Re: pgsql: Compress GIN posting lists, for smaller index size. |