Re: Using read stream in autoprewarm

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: Using read stream in autoprewarm
Дата
Msg-id CAAKRu_b_b7n75gx2uT_4f4HCEKC1cEn2T3xzuESkpbs--UO_Fg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Using read stream in autoprewarm  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sat, Mar 29, 2025 at 4:44 PM Andres Freund <andres@anarazel.de> wrote:
>
> How about having an iterator function operating on a pointer to iterator state
> that's used both by the main loop and the read stream callback? If the
> iterator reaches the next relation, it returns InvalidBlockNumber and the main
> loop starts the next stream?

I don't think that removes the need for the first_block special case.
And we still need to duplicate the logic for detecting the next
database, block, or filenumber in both places. It maybe reduces the
potential for error a little bit. But I don't think it improves the
clarity.

- Melanie



В списке pgsql-hackers по дате отправления: