Re: Using read stream in autoprewarm

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: Using read stream in autoprewarm
Дата
Msg-id CAAKRu_ZufybEzRbqeV7sYV4eskk-P7MVLDNMQQembQknG=XNuw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Using read stream in autoprewarm  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
On Sat, Mar 29, 2025 at 4:09 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
>
> One alternative is to loop through the array of BlockInfoRecords and
> get the start and end positions of the blocks in the arary for a
> single relation/fork combo. Then we could make the read stream and
> pass those two positions and the array as callback_private_data. That
> would mean we loop through the whole array twice, but I wonder if the
> improvement in clarity is worth it?

An alternative to this alternative is to somehow include the length of
each "span" (BlockInfoRecords from a single relation/fork) in the
first BlockInfoRecord of that span when building the array. Dunno how
hard that would be, but then you wouldn't have to loop through it
twice.

- Melanie



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