pgsql: Fix per-tuple memory leak in partition tuple routing

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix per-tuple memory leak in partition tuple routing
Date: 2018-08-01 20:38:08
Message-ID: E1fkxsm-0001jT-2m@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix per-tuple memory leak in partition tuple routing

Some operations were being done in a longer-lived memory context,
causing intra-query leaks. It's not noticeable unless you're doing a
large COPY, but if you are, it eats enough memory to cause a problem.

Co-authored-by: Kohei KaiGai <kaigai(at)heterodb(dot)com>
Co-authored-by: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Co-authored-by: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Discussion: https://postgr.es/m/CAOP8fzYtVFWZADq4c=KoTAqgDrHWfng+AnEPEZccyxqxPVbbWQ@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/34295b87fbbcbaf26280f53f006b20971dbad1f3

Modified Files
--------------
src/backend/executor/execPartition.c | 52 ++++++++++++++++++++++++++----------
1 file changed, 38 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-08-01 21:05:51 pgsql: Fix unnoticed variable shadowing in previous commit
Previous Message Tom Lane 2018-08-01 20:07:54 Re: pgsql: Use signals for postmaster death on Linux.