pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Push dedicated BumpBlocks to the tail of the blocks list
Date: Tue, 16 Apr 2024 22:40:52 +0000
Message-ID: <E1rwrTv-002Pn2-LN@gemulon.postgresql.org> (raw)

Push dedicated BumpBlocks to the tail of the blocks list

BumpContext relies on using the head block from its 'blocks' field to
use as the current block to allocate new chunks to.  When we receive an
allocation request larger than allocChunkLimit, we place these chunks on
a new dedicated block and, until now, we pushed the block onto the
*head* of the 'blocks' list.

This behavior caused the previous bump block to no longer be available
for new normal-sized (non-large) allocations and would result in blocks
only being partially filled if a large allocation request arrived before
the block became full.

Here adjust the code to push these dedicated blocks onto the *tail* of
the blocks list so that the head block remains intact and available to
be used by normal allocation request sizes until it becomes full.

In passing, make the elog(ERROR) calls for the unsupported callbacks
consistent.  Likewise for the header comments for those functions.

Discussion: https://postgr.es/m/CAApHDvp9___r-ayJj0nZ6GD3MeCGwGZ0_6ZptWpwj+zqHtmwCw@mail.gmail.com
Discussion: https://postgr.es/m/CAApHDvqerXpzUnuDQfUEi3DZA+9=Ud9WSt3ruxN5b6PcOosx2g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6d2fd66b9908d1557d7e49b1bdb4c597192f3729

Modified Files
--------------
src/backend/utils/mmgr/bump.c          | 17 ++++++++++-------
src/test/regress/expected/sysviews.out |  2 +-
2 files changed, 11 insertions(+), 8 deletions(-)



view thread (2+ messages)

Message-ID: <E1rwrTv-002Pn2-LN@gemulon.postgresql.org>
Permalink:  ../E1rwrTv-002Pn2-LN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rwrTv-002Pn2-LN@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: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Push dedicated BumpBlocks to the tail of the blocks list
  In-Reply-To: <E1rwrTv-002Pn2-LN@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