Scan the buffer pool just once, not once per fork, during relation drop.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/twophase.c | modified | +1 −5 |
| src/backend/access/transam/xact.c | modified | +2 −6 |
| src/backend/catalog/storage.c | modified | +1 −5 |
| src/backend/storage/buffer/bufmgr.c | modified | +41 −1 |
| src/backend/storage/buffer/localbuf.c | modified | +40 −0 |
| src/backend/storage/smgr/smgr.c | modified | +61 −4 |
| src/include/storage/buf_internals.h | modified | +1 −0 |
| src/include/storage/bufmgr.h | modified | +1 −0 |
| src/include/storage/smgr.h | modified | +2 −2 |