pgsql: Misc GIN refactoring. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Misc GIN refactoring.
Date
Msg-id E1Vdyae-0000wD-Iz@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Improve the error message given for modifying a window with fram
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix missing argument and function prototypes.