diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-04 14:58:46 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-04 14:58:46 -0400 |
commit | dbc6eb1f4b840d252031419d4bf694316812124f (patch) | |
tree | b72f25c03ff11e29dd7e76fbd43781311d77c32d /src/include/postgres_ext.h | |
parent | 79e15c7d86d3f781cc390a5a04db18254ce97b79 (diff) | |
download | postgresql-dbc6eb1f4b840d252031419d4bf694316812124f.tar.gz postgresql-dbc6eb1f4b840d252031419d4bf694316812124f.zip |
Fix memory leak in LogStandbySnapshot().
The array allocated by GetRunningTransactionLocks() needs to be pfree'd
when we're done with it. Otherwise we leak some memory during each
checkpoint, if wal_level = hot_standby. This manifests as memory bloat
in the checkpointer process, or in bgwriter in versions before we made
the checkpointer separate.
Reported and fixed by Naoya Anzai. Back-patch to 9.0 where the issue
was introduced.
In passing, improve comments for GetRunningTransactionLocks(), and add
an Assert that we didn't overrun the palloc'd array.
Diffstat (limited to 'src/include/postgres_ext.h')
0 files changed, 0 insertions, 0 deletions