aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2006-07-11 16:55:34 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2006-07-11 16:55:34 +0000
commit234163649e4eb7eb348e2a00192fec4a30cf0e33 (patch)
tree2cc5c929e9c62924addac67ae7b981d98633c538 /src/include
parentfa601357fb6c907a8e339b8a2ea7b4a8e2acf212 (diff)
downloadpostgresql-234163649e4eb7eb348e2a00192fec4a30cf0e33.tar.gz
postgresql-234163649e4eb7eb348e2a00192fec4a30cf0e33.zip
GIN improvements
- Replace sorted array of entries in maintenance_work_mem to binary tree, this should improve create performance. - More precisely calculate allocated memory, eliminate leaks with user-defined extractValue() - Improve wordings in tsearch2
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/gin.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/include/access/gin.h b/src/include/access/gin.h
index c13d726aa91..ba7d15cf1fc 100644
--- a/src/include/access/gin.h
+++ b/src/include/access/gin.h
@@ -3,7 +3,7 @@
* header file for postgres inverted index access method implementation.
*
* Copyright (c) 2006, PostgreSQL Global Development Group
- * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.4 2006/07/11 13:54:24 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.5 2006/07/11 16:55:34 teodor Exp $
*--------------------------------------------------------------------------
*/
@@ -414,21 +414,26 @@ extern Datum arraycontains(PG_FUNCTION_ARGS);
extern Datum arraycontained(PG_FUNCTION_ARGS);
/* ginbulk.c */
-typedef struct {
+typedef struct EntryAccumulator {
Datum value;
uint32 length;
uint32 number;
ItemPointerData *list;
bool shouldSort;
+ struct EntryAccumulator *left;
+ struct EntryAccumulator *right;
} EntryAccumulator;
typedef struct {
GinState *ginstate;
EntryAccumulator *entries;
- uint32 length;
- uint32 number;
- uint32 curget;
+ uint32 maxdepth;
+ EntryAccumulator **stack;
+ uint32 stackpos;
uint32 allocatedMemory;
+
+ uint32 length;
+ EntryAccumulator *entryallocator;
} BuildAccumulator;
extern void ginInitBA(BuildAccumulator *accum);