diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-04 14:58:57 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-04 14:58:57 -0400 |
commit | dc12e477eb8a9b502bb613299b9e2b3acd85a4d5 (patch) | |
tree | c9ca28be1600699387e55f2753015a111dba775b /src/tutorial/funcs.c | |
parent | 89bd9fe5fde46af8e2d93d2cb78a8142ac7caf4d (diff) | |
download | postgresql-dc12e477eb8a9b502bb613299b9e2b3acd85a4d5.tar.gz postgresql-dc12e477eb8a9b502bb613299b9e2b3acd85a4d5.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/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions