Fix memory leak in GIN index scans.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f0e766bd7f77774075297526bd2da8f3de226c1f
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2016-04-15T04:02:26Z
Releases: 9.6.0
Fix memory leak in GIN index scans.

The code had a query-lifespan memory leak when encountering GIN entries
that have posting lists (rather than posting trees, ie, there are a
relatively small number of heap tuples containing this index key value).
With a suitable data distribution this could add up to a lot of leakage.
Problem seems to have been introduced by commit 36a35c550, so back-patch
to 9.4.

Julien Rouhaud

Files

PathChange+/−
src/backend/access/gin/ginget.c modified +1 −0