From ce5326eed386959aac7a322880896ddeade7fd52 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 27 Nov 2013 15:43:05 +0200 Subject: More GIN refactoring. Separate the insertion payload from the more static portions of GinBtree. GinBtree now only contains information related to searching the tree, and the information of what to insert is passed separately. Add root block number to GinBtree, instead of passing it around all the functions as argument. Split off ginFinishSplit() from ginInsertValue(). ginFinishSplit is responsible for finding the parent and inserting the downlink to it. --- src/backend/access/gin/ginget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/access/gin/ginget.c') diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c index 2a3991f1d12..f2ee2fb9666 100644 --- a/src/backend/access/gin/ginget.c +++ b/src/backend/access/gin/ginget.c @@ -374,7 +374,7 @@ restartScanEntry: ginPrepareEntryScan(&btreeEntry, entry->attnum, entry->queryKey, entry->queryCategory, ginstate); - stackEntry = ginFindLeafPage(&btreeEntry, GIN_ROOT_BLKNO, true); + stackEntry = ginFindLeafPage(&btreeEntry, true); page = BufferGetPage(stackEntry->buffer); needUnlock = TRUE; -- cgit v1.2.3