postgresql/src
Andres Freund 9cf37a527c Plug leak in BuildTupleHashTable by creating ExprContext in correct context.
In bf6c614a2f I added a expr context to evaluate the grouping
expression. Unfortunately the code I added initialized them while in
the calling context, rather the table context.  Additionally, I used
CreateExprContext() rather than CreateStandaloneExprContext(), which
creates the econtext in the estate's query context.

Fix that by using CreateStandaloneExprContext when in the table's
tablecxt. As we rely on the memory being freed by a memory context
reset that means that the econtext's shutdown callbacks aren't being
called, but that seems ok as the expressions are tightly controlled
due to ExecBuildGroupingEqual().

Bug: #15592
Reported-By: Dmitry Marakasov
Author: Andres Freund
Discussion: https://postgr.es/m/20190114222838.h6r3fuyxjxkykf6t@alap3.anarazel.de
Backpatch: 11, where I broke this in bf6c614a2f
2019-02-09 01:05:50 -08:00
..
backend Plug leak in BuildTupleHashTable by creating ExprContext in correct context. 2019-02-09 01:05:50 -08:00
bin Fix searchpath and module location for pg_rewind and ssl TAP tests 2019-02-07 11:09:41 -05:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:22 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Fix heap_getattr() handling of fast defaults. 2019-02-06 01:09:42 -08:00
interfaces Remove infinite-loop hazards in ecpg test suite. 2019-01-24 16:46:55 -05:00
makefiles Move port-specific parts of with_temp_install to port makefile. 2019-02-04 18:56:17 +00:00
pl Fix misc typos in comments. 2019-01-23 13:43:41 +02:00
port Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Fix searchpath and module location for pg_rewind and ssl TAP tests 2019-02-07 11:09:41 -05:00
timezone Update time zone data files to tzdata release 2018i. 2019-02-05 10:59:06 -05:00
tools Unify searchpath and do file logic in MSVC build scripts. 2019-02-06 07:49:07 -05:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Move port-specific parts of with_temp_install to port makefile. 2019-02-04 18:56:17 +00:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00