From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, 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-30 00:42:52 |
Message-ID: | CAAKRu_b_b7n75gx2uT_4f4HCEKC1cEn2T3xzuESkpbs--UO_Fg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 29, 2025 at 4:44 PM Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2025-03-30 01:14:18 | Re: speedup COPY TO for partitioned table. |
Previous Message | Andres Freund | 2025-03-30 00:39:54 | Re: AIO v2.5 |