]> granicus.if.org Git - postgresql/commit
Scan the buffer pool just once, not once per fork, during relation drop.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Jun 2012 21:42:27 +0000 (17:42 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Jun 2012 21:43:11 +0000 (17:43 -0400)
commitece01aae479227d9836294b287d872c5a6146a11
treec079ac4532474ccd3803f21a95ffb08fb8373dd9
parent5baf6da71701abcb76487d9de68f7d7dc6c365e9
Scan the buffer pool just once, not once per fork, during relation drop.

This provides a speedup of about 4X when NBuffers is large enough.
There is also a useful reduction in sinval traffic, since we
only do CacheInvalidateSmgr() once not once per fork.

Simon Riggs, reviewed and somewhat revised by Tom Lane
src/backend/access/transam/twophase.c
src/backend/access/transam/xact.c
src/backend/catalog/storage.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/localbuf.c
src/backend/storage/smgr/smgr.c
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h
src/include/storage/smgr.h