aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2023-02-20 11:29:31 -0800
committerJeff Davis <jdavis@postgresql.org>2023-02-20 11:29:31 -0800
commitda32a99df1f519622eee0d5c3ea61226468272a7 (patch)
tree0d39a914d02372e492d5e0065ecef480d2e75bba /src
parent305d89ad93ff6eb3eecae485bbfb2531a349906f (diff)
downloadpostgresql-da32a99df1f519622eee0d5c3ea61226468272a7.tar.gz
postgresql-da32a99df1f519622eee0d5c3ea61226468272a7.zip
Limit memory usage of pg_walinspect functions.
GetWALRecordsInfo() and pg_get_wal_fpi_info() can leak memory across WAL record iterations. Fix this by using a temporary memory context that's reset for each WAL record iteraion. Also use a temporary context for loops in GetXLogSummaryStats(). The number of iterations is a small constant, so the previous behavior was not a leak, but fix for clarity (but no need to backport). Backport GetWALRecordsInfo() change to version 15. pg_get_wal_fpi_info() didn't exist in version 15. Reported-by: Peter Geoghegan Author: Bharath Rupireddy Discussion: https://www.postgresql.org/message-id/CAH2-WznLEJjn7ghmKOABOEZYuJvkTk%3DGKU3m0%2B-XBAH%2BerPiJQ%40mail.gmail.com Backpatch-through: 15
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions