]> granicus.if.org Git - postgresql/commit
Fix small query-lifespan memory leak in bulk updates.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Aug 2016 02:20:01 +0000 (22:20 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Aug 2016 02:20:01 +0000 (22:20 -0400)
commit566afa15c8dc64430dfb1e95c661e5875863253c
tree9159539ba0ec3b1e268a692046ace78ebf50a44f
parent08a823e53b78507c9fcc8a6d77de1a1d5b7c1b13
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.15676.45171@wrigleys.postgresql.org>
src/backend/access/heap/heapam.c