diff options
author | Andres Freund <andres@anarazel.de> | 2025-09-05 12:25:59 -0400 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2025-09-05 12:25:59 -0400 |
commit | 2c789405275928ce0d2ceb7c4add91d27df92502 (patch) | |
tree | f03b996c77da6fc30c91658853550a1a1bb0dd41 /src/backend/utils/adt/numeric.c | |
parent | 50e4c6ace5e69fbe69868c270a1c76acd4cb12ec (diff) |
bufmgr: Remove freelist, always use clock-sweep
This set of changes removes the list of available buffers and instead simply
uses the clock-sweep algorithm to find and return an available buffer. This
also removes the have_free_buffer() function and simply caps the
pg_autoprewarm process to at most NBuffers.
While on the surface this appears to be removing an optimization it is in fact
eliminating code that induces overhead in the form of synchronization that is
problematic for multi-core systems.
The main reason for removing the freelist, however, is not the moderate
improvement in scalability, but that having the freelist would require
dedicated complexity in several upcoming patches. As we have not been able to
find a case benefiting from the freelist...
Author: Greg Burd <greg@burd.me>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/70C6A5B5-2A20-4D0B-BC73-EB09DD62D61C@getmailspring.com
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions