pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Remove memory leak protection from Gather and Gather Merge nodes
Date: Mon, 04 Dec 2017 15:45:02 +0000
Message-ID: <E1eLsvW-0005FW-Be@gemulon.postgresql.org> (raw)

Remove memory leak protection from Gather and Gather Merge nodes.

Before commit 6b65a7fe62e129d5c2b85cd74d6a91d8f7564608, tqueue.c could
perform tuple remapping and thus leak memory, which is why commit
af33039317ddc4a0e38a02e2255c2bf453115fd2 made TupleQueueReaderNext
run in a short-lived context.  Now, however, tqueue.c has been reduced
to a shadow of its former self, and there shouldn't be any chance of
leaks any more.  Accordingly, remove some tuple copying and memory
context manipulation to speed up processing.

Patch by me, reviewed by Amit Kapila.  Some testing by Rafia Sabih.

Discussion: http://postgr.es/m/CAA4eK1LSDydwrNjmYSNkfJ3ZivGSWH9SVswh6QpNzsMdj_oOQA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9f4992e2a9939a4c3d560c2ac58067861ee0029a

Modified Files
--------------
src/backend/executor/nodeGather.c      | 14 ++------------
src/backend/executor/nodeGatherMerge.c | 10 +---------
src/backend/executor/tqueue.c          |  2 ++
3 files changed, 5 insertions(+), 21 deletions(-)



Message-ID: <E1eLsvW-0005FW-Be@gemulon.postgresql.org>
Permalink:  ../E1eLsvW-0005FW-Be@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eLsvW-0005FW-Be@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: rhaas@postgresql.org
  Subject: Re: pgsql: Remove memory leak protection from Gather and Gather Merge nodes
  In-Reply-To: <E1eLsvW-0005FW-Be@gemulon.postgresql.org>
  References: <E1eLsvW-0005FW-Be@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