Hi,

While looking at RelationAddBlocks(), I noticed that it calls
FreeSpaceMapVacuumRange() with last_block as the end of the range.
FreeSpaceMapVacuumRange() treats the end block as exclusive, so the last
newly recorded FSM block is not propagated. This looks like it may
simply have missed converting the inclusive last_block into the
exclusive endpoint expected by FreeSpaceMapVacuumRange().

The first patch contains the actual fix, by passing last_block + 1. The
second patch is only meant to demonstrate the issue: it adds a small
test_fsm regression test using a non-empty range across an FSM leaf page
boundary, showing that excluding the last block can leave it
unsearchable after the earlier block is consumed.

---
Regards,
Jingtang

Attachment: 0001-hio-Include-last-block-in-FSM-vacuum-range.patch
Description: Binary data

Attachment: 0002-test_fsm-Cover-FSM-range-endpoint-propagation.patch
Description: Binary data

Reply via email to