diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-04 14:58:52 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-04 14:58:52 -0400 |
commit | 81fe138ba252987815506caa57719822709b730f (patch) | |
tree | 58b38441929e04b6b2d01ef000dc3fef975f82e3 /src/backend/access/heap/heapam.c | |
parent | cc510d97afe63cacb3129d4bd19b14118cada6bb (diff) |
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/backend/access/heap/heapam.c')
0 files changed, 0 insertions, 0 deletions