agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Include last block in FSM vacuum of bulk extended relation
Date: Wed, 15 Jul 2026 19:56:54 +0000
Message-ID: <E1wk5iv-000LN9-1H@gemulon.postgresql.org> (raw)
Include last block in FSM vacuum of bulk extended relation
When bulk-extending a relation, we add the newly-added blocks that we
won't immediately use to the free space map and then call
FreeSpaceMapVacuumRange() to propagate that free space up the FSM tree,
so other backends can find and reuse it.
However, the end block argument to FreeSpaceMapVacuumRange() is
exclusive, and we passed the number of the last added block (since
00d1e02be24). If that block was the first one covered by a new FSM page,
its free space wasn't propagated up the tree and was therefore invisible
to FSM searches until the next FSM vacuum.
Fix by passing the block number one past the last added block, so the
full range is vacuumed.
Author: Jingtang Zhang <mrdrivingduck@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/flat/CAPsk3_Bx_vdybN%3D-DZu8HLStf%2BXnuFUBkLwxouONSMkWuO9oug%40mail.gmail.com
Backpatch-through: 16
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/768ae083ebac8e886d2fa1754eb27f1deabb5704
Modified Files
--------------
src/backend/access/heap/hio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
view thread (5+ messages) latest in thread
Message-ID: <E1wk5iv-000LN9-1H@gemulon.postgresql.org>
Permalink: ../E1wk5iv-000LN9-1H@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wk5iv-000LN9-1H@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: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Include last block in FSM vacuum of bulk extended relation
In-Reply-To: <E1wk5iv-000LN9-1H@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox