> On 22 Oct 2024, at 00:05, Melanie Plageman <melanieplage...@gmail.com> wrote:
> 
> I was suggesting you call RelationGetNumberOfBlocks() once
> current_block == last_exclusive in the callback itself.

Consider following sequence of events:

0. We schedule some buffers for IO
1. We call RelationGetNumberOfBlocks() in callback when current_block == 
last_exclusive and return InvalidBlockNumber to signal EOF
After this:
2. Some page is getting split into new page with number last_exclusive
3. Buffers from IO are returned and vacuumed, but not with number 
last_exclusive, because it was not scheduled

Maybe I'm missing something...


Best regards, Andrey Borodin.

Reply via email to