Обсуждение: pgsql: Cleanup of new b-tree page deletion code.

Поиск
Список
Период
Сортировка

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

От
Heikki Linnakangas
Дата:
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(-)