Hi Hackers, I was looking at Greg's (cc'd) work around buffer management and thought of contributing there to review the patch and add some tests. Thanks Greg for encouraging and suggesting to write this test module instead. This is an eviction algorithm agnostic test module to test buffer manager general properties.
The buffer manager (src/backend/storage/buffer/) has no test module of its own. It is exercised constantly by the rest of the regression suite, but only incidentally and nothing asserts its properties directly, so a change to the replacement policy or to the residency bookkeeping might regress without any test noticing. The attached patch adds src/test/modules/test_bufmgr. The framing I would like to put up front, because it drove most of the design: this tests the buffer manager as a subsystem, not any one replacement algorithm. The module is named for the subsystem under test, which is stable, rather than for the current eviction policy, which keeps changing. More details on use cases tested and parameters used to run tests are added to README. I would appreciate review, particularly on whether the properties I have picked are the right set, and on whether the pressure-generation approach is robust enough for the buildfarm's range of configurations. Thanks, Dinesh Salve
v1-0001-Add-test_bufmgr-algorithm-agnostic-tests.patch
Description: Binary data
