pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Use a separate memory context for GIN scan keys.
Date: Wed, 04 Feb 2015 15:41:46 +0000
Message-ID: <E1YJ25K-0005Dz-E2@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d88976cfa1302e8dccdcbfe55e9e29faee8c0cdf

Modified Files
--------------
src/backend/access/gin/ginget.c  |    5 ++++-
src/backend/access/gin/ginscan.c |   43 ++++++++++++++++++++------------------
src/include/access/gin_private.h |    2 ++
3 files changed, 29 insertions(+), 21 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1YJ25K-0005Dz-E2@gemulon.postgresql.org>
Permalink:  ../E1YJ25K-0005Dz-E2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1YJ25K-0005Dz-E2@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Use a separate memory context for GIN scan keys.
  In-Reply-To: <E1YJ25K-0005Dz-E2@gemulon.postgresql.org>
  References: <E1YJ25K-0005Dz-E2@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox