From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Allow BufferAccessStrategy to limit pin count. |
Date: | 2024-04-06 10:12:50 |
Message-ID: | E1rt32X-000nK8-LG@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Allow BufferAccessStrategy to limit pin count.
While pinning extra buffers to look ahead, users of strategies are in
danger of using too many buffers. For some strategies, that means
"escaping" from the ring, and in others it means forcing dirty data to
disk very frequently with associated WAL flushing. Since external code
has no insight into any of that, allow individual strategy types to
expose a clamp that should be applied when deciding how many buffers to
pin at once.
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAAKRu_aJXnqsyZt6HwFLnxYEBgE17oypkxbKbT1t1geE_wvH2Q%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3bd8439ed628c7e9ac250b1a042d9044303c37e7
Modified Files
--------------
src/backend/storage/aio/read_stream.c | 5 +++++
src/backend/storage/buffer/freelist.c | 42 +++++++++++++++++++++++++++++++++++
src/include/storage/bufmgr.h | 1 +
3 files changed, 48 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2024-04-06 10:17:15 | pgsql: Speed up tail processing when hashing aligned C strings, take tw |
Previous Message | John Naylor | 2024-04-06 05:21:21 | pgsql: Convert uses of hash_string_pointer to fasthash equivalent |