aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/commit.sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-05-23 14:43:43 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-05-23 14:43:43 -0400
commit02502c1bca544e25cc891d8ea596f6d89c540bcf (patch)
tree5b71d0a7d887255ff940566beffd36103d720c5a /doc/src/sgml/ref/commit.sgml
parent6aa33afe6da1ce5e6a9c68900727db4621f899cd (diff)
downloadpostgresql-02502c1bca544e25cc891d8ea596f6d89c540bcf.tar.gz
postgresql-02502c1bca544e25cc891d8ea596f6d89c540bcf.zip
Fix per-relation memory leakage in autovacuum.
PgStat_StatTabEntry and AutoVacOpts structs were leaked until the end of the autovacuum worker's run, which is bad news if there are a lot of relations in the database. Note: pfree'ing the PgStat_StatTabEntry structs here seems a bit risky, because pgstat_fetch_stat_tabentry_ext does not guarantee anything about whether its result is long-lived. It appears okay so long as autovacuum forces PGSTAT_FETCH_CONSISTENCY_NONE, but I think that API could use a re-think. Also ensure that the VacuumRelation structure passed to vacuum() is in recoverable storage. Back-patch to v15 where we started to manage table statistics this way. (The AutoVacOpts leakage is probably older, but I'm not excited enough to worry about just that part.) Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/285483.1746756246@sss.pgh.pa.us Backpatch-through: 15
Diffstat (limited to 'doc/src/sgml/ref/commit.sgml')
0 files changed, 0 insertions, 0 deletions