aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-12-03 09:04:20 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-12-03 09:04:20 +0100
commit1acf10549e64c6a52ced570d712fcba1a2f5d1ec (patch)
tree27d398dde27f323f29ff6f1963c2d331aede72b9 /src/tutorial/funcs.c
parent1ba0782ce90cb4261098de59b49ae5cb2326566b (diff)
downloadpostgresql-1acf10549e64c6a52ced570d712fcba1a2f5d1ec.tar.gz
postgresql-1acf10549e64c6a52ced570d712fcba1a2f5d1ec.zip
Fix temporary memory leak in system table index scans
Commit 811af9786b introduced palloc() calls into systable_beginscan() and systable_beginscan_ordered(). But there was no pfree(), as is the usual style. It turns out that an ANALYZE of a partitioned table can invoke many thousand system table index scans, and this memory is not cleaned up until the end of the command, so this can temporarily leak quite a bit of memory. Maybe there are improvements to be made at a higher level about this, but for now, insert a couple of corresponding pfree() calls to fix this particular issue. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://www.postgresql.org/message-id/Z0XTfIq5xUtbkiIh@pryzbyj2023
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions