aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-08-13 11:27:28 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-08-13 11:27:28 -0400
commitab8c84db2f7af008151b848cf1d6a4672a39eecd (patch)
tree5f21ce8f2b4754b6dc4944138d6627d65b5c05bd /src/tutorial/basics.source
parent52bffe3499d8e5f61efa385ab3c6a074314ee5db (diff)
downloadpostgresql-ab8c84db2f7af008151b848cf1d6a4672a39eecd.tar.gz
postgresql-ab8c84db2f7af008151b848cf1d6a4672a39eecd.zip
Prevent memory leaks in RelationGetIndexList, RelationGetIndexAttrBitmap.
When replacing rd_indexlist, rd_indexattr, etc, we neglected to pfree any old value of these fields. Under ordinary circumstances, the old value would always be NULL, so this seemed reasonable enough. However, in cases where we're rebuilding a system catalog's relcache entry and another cache flush occurs on that same catalog meanwhile, it's possible for the field to not be NULL when we return to the outer level, because we already refilled it while recovering from the inner flush. This leads to a fairly small session-lifespan leak in CacheMemoryContext. In real-world usage the leak would be too small to notice; but in testing with CLOBBER_CACHE_RECURSIVELY the leakage can add up to the point of causing OOM failures, as reported by Tomas Vondra. The issue has been there a long time, but it only seems worth fixing in HEAD, like the previous fix in this area (commit 078b2ed291c758e7).
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions