pgsql: gistendscan() forgot to free so->giststate.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: gistendscan() forgot to free so->giststate.
Date: 2011-09-16 08:29:14
Message-ID: E1R4TnO-0003Ue-Fy@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

gistendscan() forgot to free so->giststate.

This oversight led to a massive memory leak --- upwards of 10KB per tuple
--- during creation-time verification of an exclusion constraint based on a
GIST index. In most other scenarios it'd just be a leak of 10KB that would
be recovered at end of query, so not too significant; though perhaps the
leak would be noticeable in a situation where a GIST index was being used
in a nestloop inner indexscan. In any case, it's a real leak of long
standing, so patch all supported branches. Per report from Harald Fuchs.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9bc6daae09e882e76850a0aa8c50de9fe07ebd15

Modified Files
--------------
src/backend/access/gist/gistscan.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message User Itagaki 2011-09-16 12:20:35 textsearch-ja - textsearch-ja: Support EXTENSION for PostgreSQL 9.1.
Previous Message Tom Lane 2011-09-16 04:44:41 pgsql: Redesign the plancache mechanism for more flexibility and effici