Fix per-tuple memory leak in partition tuple routing

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 1c9bb02d8ec1d5b1b319e4fed70439a403c245b1
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2018-08-01T20:29:15Z
Releases: 12.0
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@heterodb.com>
Co-authored-by: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/CAOP8fzYtVFWZADq4c=KoTAqgDrHWfng+AnEPEZccyxqxPVbbWQ@mail.gmail.com

Files

PathChange+/−
src/backend/executor/execPartition.c modified +41 −16

Discussion