diff options
| author | Heikki Linnakangas | 2015-02-04 15:40:25 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2015-02-04 15:40:25 +0000 |
| commit | d88976cfa1302e8dccdcbfe55e9e29faee8c0cdf (patch) | |
| tree | c1fb1f00b9c7d350b723d1eafabaf764dc8d30f3 /src/include/access | |
| parent | 57fe246890ad51e166fb6a8da937e41c35d7a279 (diff) | |
Use a separate memory context for GIN scan keys.
It was getting tedious to track and release all the different things that
form a scan key. We were leaking at least the queryCategories array, and
possibly more, on a rescan. That was visible if a GIN index was used in a
nested loop join. This also protects from leaks in extractQuery method.
No backpatching, given the lack of complaints from the field. Maybe later,
after this has received more field testing.
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/gin_private.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index c949c97edec..bda7c284b13 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -888,6 +888,8 @@ typedef struct GinScanOpaqueData uint32 totalentries; uint32 allocentries; /* allocated length of entries[] */ + MemoryContext keyCtx; /* used to hold key and entry data */ + bool isVoidRes; /* true if query is unsatisfiable */ } GinScanOpaqueData; |
