]> granicus.if.org Git - postgresql/commit
Use a separate memory context for GIN scan keys.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 4 Feb 2015 15:40:25 +0000 (17:40 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 4 Feb 2015 15:40:25 +0000 (17:40 +0200)
commitd88976cfa1302e8dccdcbfe55e9e29faee8c0cdf
treec1fb1f00b9c7d350b723d1eafabaf764dc8d30f3
parent57fe246890ad51e166fb6a8da937e41c35d7a279
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.
src/backend/access/gin/ginget.c
src/backend/access/gin/ginscan.c
src/include/access/gin_private.h