pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow BufferAccessStrategy to limit pin count.
Date: Sat, 06 Apr 2024 10:12:50 +0000
Message-ID: <E1rt32X-000nK8-LG@gemulon.postgresql.org> (raw)

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@anarazel.de>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.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(+)



Message-ID: <E1rt32X-000nK8-LG@gemulon.postgresql.org>
Permalink:  ../E1rt32X-000nK8-LG@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rt32X-000nK8-LG@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Allow BufferAccessStrategy to limit pin count.
  In-Reply-To: <E1rt32X-000nK8-LG@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox