agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Include last block in FSM vacuum of bulk extended relation 5+ messages / 1 participants [nested] [flat]
* pgsql: Include last block in FSM vacuum of bulk extended relation @ 2026-07-15 19:51 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 5+ messages in thread From: Melanie Plageman @ 2026-07-15 19:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a2fd8d65a0b75aeb81cd52204f358544d1888b02 Modified Files -------------- src/backend/access/heap/hio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Include last block in FSM vacuum of bulk extended relation @ 2026-07-15 19:53 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 5+ messages in thread From: Melanie Plageman @ 2026-07-15 19:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7a103928a0986c6f9308a3bc476176fa6e1dd0c9 Modified Files -------------- src/backend/access/heap/hio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Include last block in FSM vacuum of bulk extended relation @ 2026-07-15 19:55 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 5+ messages in thread From: Melanie Plageman @ 2026-07-15 19:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/eabc9a9dd908a1be7d66dc26b378b1488fd14847 Modified Files -------------- src/backend/access/heap/hio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Include last block in FSM vacuum of bulk extended relation @ 2026-07-15 19:56 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 5+ messages in thread From: Melanie Plageman @ 2026-07-15 19:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Include last block in FSM vacuum of bulk extended relation @ 2026-07-15 19:59 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 5+ messages in thread From: Melanie Plageman @ 2026-07-15 19:59 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0fd5595aa3e71e54a297b18bc104f487c8555550 Modified Files -------------- src/backend/access/heap/hio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-07-15 19:59 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-15 19:51 pgsql: Include last block in FSM vacuum of bulk extended relation Melanie Plageman <melanieplageman@gmail.com> 2026-07-15 19:53 pgsql: Include last block in FSM vacuum of bulk extended relation Melanie Plageman <melanieplageman@gmail.com> 2026-07-15 19:55 pgsql: Include last block in FSM vacuum of bulk extended relation Melanie Plageman <melanieplageman@gmail.com> 2026-07-15 19:56 pgsql: Include last block in FSM vacuum of bulk extended relation Melanie Plageman <melanieplageman@gmail.com> 2026-07-15 19:59 pgsql: Include last block in FSM vacuum of bulk extended relation Melanie Plageman <melanieplageman@gmail.com>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox