diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-03-18 20:50:56 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-03-18 22:22:47 -0400 |
commit | 415ffdc2205e209b6a73fb42a3fdd6e57e16c7b2 (patch) | |
tree | 2b72f426e0f3598e14796c913ff582f6c48424da /src/backend/parser/parse_utilcmd.c | |
parent | 28644fac10731e30e70b622986a6fbbeb5a5b2f9 (diff) | |
download | postgresql-415ffdc2205e209b6a73fb42a3fdd6e57e16c7b2.tar.gz postgresql-415ffdc2205e209b6a73fb42a3fdd6e57e16c7b2.zip |
Don't run RelationInitTableAccessMethod in a long-lived context.
Some code paths in this function perform syscache lookups, which
can lead to table accesses and possibly leakage of cruft into
the caller's context. If said context is CacheMemoryContext,
we eventually will have visible bloat. But fixing this is no
harder than moving one memory context switch step. (The other
callers don't have a problem.)
Andres Freund and I independently found this via valgrind testing.
Back-patch to v12 where this code was added.
Discussion: https://postgr.es/m/20210317023101.anvejcfotwka6gaa@alap3.anarazel.de
Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions