pgsql: Fix small query-lifespan memory leak in bulk updates.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix small query-lifespan memory leak in bulk updates.
Date: 2016-08-25 02:20:42
Message-ID: E1bckHa-00013p-Na@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix small query-lifespan memory leak in bulk updates.

When there is an identifiable REPLICA IDENTITY index on the target table,
heap_update leaks the id_attrs bitmapset. That's not many bytes, but it
adds up over enough rows, since the code typically runs in a query-lifespan
context. Bug introduced in commit e55704d8b, which did a rather poor job
of cloning the existing use-pattern for RelationGetIndexAttrBitmap().

Per bug #14293 from Zhou Digoal. Back-patch to 9.4 where the bug was
introduced.

Report: <20160824114320(dot)15676(dot)45171(at)wrigleys(dot)postgresql(dot)org>

Branch
------
master

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

Modified Files
--------------
src/backend/access/heap/heapam.c | 2 ++
1 file changed, 2 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-08-25 13:58:28 pgsql: Fix instability in parallel regression tests.
Previous Message Bruce Momjian 2016-08-25 01:11:49 pgsql: doc: more replacement of <literal> with something better