aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeProjectSet.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-08-31 16:23:20 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-08-31 16:23:20 -0400
commitfeec1b2d5af4bbac9106065f5b9f55413084a543 (patch)
treed422188a1d8131fb3a241ce2fe3a844b4f7b9cc8 /src/backend/executor/nodeProjectSet.c
parente969f1ae2b01d7b69371332b839fa16e3b54e56d (diff)
downloadpostgresql-feec1b2d5af4bbac9106065f5b9f55413084a543.tar.gz
postgresql-feec1b2d5af4bbac9106065f5b9f55413084a543.zip
Prevent long-term memory leakage in autovacuum launcher.
get_database_list() failed to restore the caller's memory context, instead leaving current context set to TopMemoryContext which is how CommitTransactionCommand() leaves it. The callers both think they are using short-lived contexts, for the express purpose of not having to worry about cleaning up individual allocations. The net effect therefore is that supposedly short-lived allocations could accumulate indefinitely in the launcher's TopMemoryContext. Although this has been broken for a long time, it seems we didn't have any obvious memory leak here until v15's rearrangement of the stats logic. I (tgl) am not entirely convinced that there's no other leak at all, though, and we're surely at risk of adding one in future back-patched fixes. So back-patch to all supported branches, even though this may be only a latent bug in pre-v15. Reid Thompson Discussion: https://postgr.es/m/972a4e12b68b0f96db514777a150ceef7dcd2e0f.camel@crunchydata.com
Diffstat (limited to 'src/backend/executor/nodeProjectSet.c')
0 files changed, 0 insertions, 0 deletions