mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user