Re: Using read_stream in index vacuum - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: Using read_stream in index vacuum
Date
Msg-id 5DDCBDE8-A024-4EDD-BDFD-4FC5244703F2@yandex-team.ru
Whole thread Raw
In response to Re: Using read_stream in index vacuum  (Junwang Zhao <zhjwpku@gmail.com>)
List pgsql-hackers

> On 19 Oct 2024, at 20:41, Junwang Zhao <zhjwpku@gmail.com> wrote:
>
> I'm wondering why is the case, ISTM that we can do *p.current_blocknum
> = scanblkno*
> and *p.last_exclusive = num_pages* in each loop of the outer for?

Thanks for reviewing!
AFAIK we cannot restart stream if it's finished, so we have a race condition of main loop and callback caller.
Resolving this race condition would make code much more complex for a relatively small benefit.

I'll address typos in next patch version, thank you for looking into this.


Best regards, Andrey Borodin.




pgsql-hackers by date:

Previous
From: Junwang Zhao
Date:
Subject: report a typo in WaitReadBuffers
Next
From: Alvaro Herrera
Date:
Subject: Re: further #include cleanup (IWYU)