aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-06-04 14:58:57 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-06-04 14:58:57 -0400
commitdc12e477eb8a9b502bb613299b9e2b3acd85a4d5 (patch)
treec9ca28be1600699387e55f2753015a111dba775b /src/tutorial/funcs.c
parent89bd9fe5fde46af8e2d93d2cb78a8142ac7caf4d (diff)
downloadpostgresql-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