pgsql: Limit memory usage of pg_walinspect functions.

2023-02-20 Thread Jeff Davis
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 n

pgsql: Limit memory usage of pg_walinspect functions.

2023-02-20 Thread Jeff Davis
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 a use temporary context for loops in GetXLogSummaryStats(). The n