]> granicus.if.org Git - postgresql/commit
hash: Refactor bucket squeeze code.
authorRobert Haas <rhaas@postgresql.org>
Mon, 27 Feb 2017 17:04:21 +0000 (22:34 +0530)
committerRobert Haas <rhaas@postgresql.org>
Mon, 27 Feb 2017 17:04:21 +0000 (22:34 +0530)
commitb0f18cb77f50a54e997d857d592f6a511617f52c
tree7227b1f1de2b718d0ca66cd2779308ac4d5418ca
parent817f2a586342767d3289a320bb1dac5dcbb76979
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.
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashpage.c
src/backend/storage/page/bufpage.c
src/include/access/hash.h
src/include/storage/bufpage.h