aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/aggregatecmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-03-18 17:54:24 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-03-18 17:54:41 -0400
commitf2004f19ed9c9228d3ea2b12379ccb4b9212641f (patch)
treee624dbef56a9b39f12341011d1a8b1ef0811aa24 /src/backend/commands/aggregatecmds.c
parent11180a5015e9c6299ee732fa587b3a8bc6dca6b2 (diff)
downloadpostgresql-f2004f19ed9c9228d3ea2b12379ccb4b9212641f.tar.gz
postgresql-f2004f19ed9c9228d3ea2b12379ccb4b9212641f.zip
Fix memory leak in printtup.c.
Commit f2dec34e1 changed things so that printtup's output stringinfo buffer was allocated outside the per-row temporary context, not inside it. This creates a need to free that buffer explicitly when the temp context is freed, but that was overlooked. In most cases, this is all happening inside a portal or executor context that will go away shortly anyhow, but that's not always true. Notably, the stringinfo ends up getting leaked when JDBC uses row-at-a-time fetches. For a query that returns wide rows, that adds up after awhile. Per bug #15700 from Matthias Otterbach. Back-patch to v11 where the faulty code was added. Discussion: https://postgr.es/m/15700-8c408321a87d56bb@postgresql.org
Diffstat (limited to 'src/backend/commands/aggregatecmds.c')
0 files changed, 0 insertions, 0 deletions