pgsql: hash: Refactor bucket squeeze code.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: hash: Refactor bucket squeeze code.
Date: 2017-02-27 17:10:02
Message-ID: E1ciOoE-0002rk-QU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

hash: Refactor bucket squeeze code.

In preparation for adding write-ahead logging to hash indexes,
refactor _hash_freeovflpage and _hash_squeezebucket so that all
related page modifications happen in a single section of code. The
previous coding assumed that it would be fine to move tuples one at a
time, and also that the various operations involved in freeing an
overflow page didn't necessarily all need to be done together, all
of which is true if you don't care about write-ahead logging.

Amit Kapila, with slight changes by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b0f18cb77f50a54e997d857d592f6a511617f52c

Modified Files
--------------
src/backend/access/hash/hashinsert.c | 41 ++++++++
src/backend/access/hash/hashovfl.c | 189 ++++++++++++++++++++++-------------
src/backend/access/hash/hashpage.c | 1 -
src/backend/storage/page/bufpage.c | 27 +++++
src/include/access/hash.h | 7 +-
src/include/storage/bufpage.h | 1 +
6 files changed, 196 insertions(+), 70 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-02-27 17:32:59 pgsql: hash: Refactor overflow page allocation.
Previous Message Tom Lane 2017-02-27 16:20:47 pgsql: Remove PL/Tcl's "module" facility.