pgsql: Cleanup of new b-tree page deletion code. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Cleanup of new b-tree page deletion code.
Date
Msg-id E1Wctti-00008I-Gq@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Cleanup of new b-tree page deletion code.

When marking a branch as half-dead, a pointer to the top of the branch is
stored in the leaf block's hi-key. During normal operation, the high key
was left in place, and the block number was just stored in the ctid field
of the high key tuple, but in WAL replay, the high key was recreated as a
truncated tuple with zero columns. For the sake of easier debugging, also
truncate the tuple in normal operation, so that the page is identical
after WAL replay. Also, rename the 'downlink' field in the WAL record to
'topparent', as that seems like a more descriptive name. And make sure
it's set to invalid when unlinking the leaf page.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4fafc4ecd9e4d224d92c4a8549c5646860787a5d

Modified Files
--------------
src/backend/access/nbtree/nbtpage.c   |   27 ++++++++++++++++++++-------
src/backend/access/nbtree/nbtxlog.c   |    8 ++++----
src/backend/access/rmgrdesc/nbtdesc.c |    8 ++++----
src/include/access/nbtree.h           |    8 +++++---
4 files changed, 33 insertions(+), 18 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix documentation of FmgrInfo.fn_nargs.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix typos in comment.