aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-03-18 20:50:56 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-03-18 20:50:56 -0400
commitea3989f3496c9c6a0c392680842518997d317e38 (patch)
tree3d66f9b352a3244cb81ad0664fbee39bf54d09bb /src/backend/executor/nodeModifyTable.c
parent5368369701447b4f2a767c34cfde1f9f4eb53f7a (diff)
downloadpostgresql-ea3989f3496c9c6a0c392680842518997d317e38.tar.gz
postgresql-ea3989f3496c9c6a0c392680842518997d317e38.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/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions