Thread: pgsql: Misc GIN refactoring.

pgsql: Misc GIN refactoring.

From
Heikki Linnakangas
Date:
Misc GIN refactoring.

Merge the isEnoughSpace and placeToPage functions in the b-tree interface
into one function that tries to put a tuple on page, and returns false if
it doesn't fit.

Move createPostingTree function to gindatapage.c, and change its contract
so that it can be passed more items than fit on the root page. It's in a
better position than the callers to know how many items fit.

Move ginMergeItemPointers out of gindatapage.c, into a separate file.

These changes make no difference now, but reduce the footprint of Alexander
Korotkov's upcoming patch to pack item pointers more tightly.

Branch
------
master

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

Modified Files
--------------
src/backend/access/gin/Makefile         |    2 +-
src/backend/access/gin/README           |    2 +-
src/backend/access/gin/ginbtree.c       |   21 ++--
src/backend/access/gin/gindatapage.c    |  163 +++++++++++++++++++++----------
src/backend/access/gin/ginentrypage.c   |   14 ++-
src/backend/access/gin/gininsert.c      |   94 +-----------------
src/backend/access/gin/ginpostinglist.c |   56 +++++++++++
src/backend/access/gin/ginvacuum.c      |   49 +++++-----
src/include/access/gin_private.h        |    3 +-
9 files changed, 223 insertions(+), 181 deletions(-)