postgresql/src/backend
Tom Lane dbc6eb1f4b 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.
2013-06-04 14:58:46 -04:00
..
access Additional spelling corrections 2013-06-03 08:40:27 -04:00
bootstrap Put back allow_system_table_mods check in heap_create(). 2013-06-03 17:22:31 +03:00
catalog Put back allow_system_table_mods check in heap_create(). 2013-06-03 17:22:31 +03:00
commands Post-pgindent cleanup 2013-06-01 09:38:15 -04:00
executor pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
foreign Arrange to cache FdwRoutine structs in foreign tables' relcache entries. 2013-03-06 23:48:09 -05:00
lib pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
libpq pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
main pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
nodes Postpone creation of pathkeys lists to fix bug #8049. 2013-04-29 14:50:03 -04:00
optimizer pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
parser Allow type_func_name_keywords in some places where they weren't before. 2013-06-02 20:09:20 -04:00
po Back out some recent translation updates. 2013-05-06 12:28:13 -04:00
port pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
postmaster pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
regex pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
replication Minor spell checking 2013-05-30 20:56:58 -04:00
rewrite pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Fix memory leak in LogStandbySnapshot(). 2013-06-04 14:58:46 -04:00
tcop pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
tsearch pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
utils Additional spelling corrections 2013-06-03 08:40:27 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
nls.mk Translation updates 2013-05-05 22:34:23 -04:00