| From: | Dinesh Salve <cooltodinesh(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | Gregory Burd <greg(at)burd(dot)me> |
| Subject: | Add test_bufmgr - algorithm-agnostic tests for the buffer manager |
| Date: | 2026-08-04 19:45:05 |
| Message-ID: | CAP+B4TA4UFojOw5Ai_tWzhOBBR_Vw9gaK35Oqj1AE7Z_XHdDoQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Add-test_bufmgr-algorithm-agnostic-tests.patch | application/octet-stream | 52.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sivaprasad | 2026-08-04 19:51:33 | Casefold wording in ILIKE comment |
| Previous Message | Masahiko Sawada | 2026-08-04 19:06:02 | Re: Add a hook for handling logical decoding messages on subscribers. |