From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
Cc: | Kirill Reshke <reshkekirill(at)gmail(dot)com>, Matheus Alcantara <mths(dot)dev(at)pm(dot)me>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Using read stream in autoprewarm |
Date: | 2025-03-29 20:33:09 |
Message-ID: | CAAKRu_ZufybEzRbqeV7sYV4eskk-P7MVLDNMQQembQknG=XNuw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 29, 2025 at 4:09 PM Melanie Plageman
<melanieplageman(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2025-03-29 20:44:16 | Re: Using read stream in autoprewarm |
Previous Message | Andres Freund | 2025-03-29 20:32:33 | Re: Why does wait_for_log() return current file size |