Re: Use streaming read I/O when enabling data checksums online

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, cca5507 <cca5507(at)qq(dot)com>, Enrique Sanchez <enriqueesanchz(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use streaming read I/O when enabling data checksums online
Date: 2026-08-24 13:13:38
Message-ID: CAN55FZ1b7SNBHSYgieAn3a7T=wMLD6yhQN6WnmW=VQ5AEEEonw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, 24 Aug 2026 at 15:32, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
> Hi ChangAo, Daniel, Enrique,
>
> On Mon, Jul 13, 2026 at 9:50 AM Daniel Gustafsson wrote:
> > Thanks for this work, I have it on my radar to review and commit for v20,
> > but will wait for the work of cleaning up and fixing the online checksums
> > code which is currrently ongoing for the beta period.
>
> I read v2 against the current online-checksum code and the earlier design
> thread. I did not find a correctness problem in the conversion.

I wanted to point out a couple of things. I am not sure whether either
is a problem, but I think they are worth mentioning. Before this
patch, an abort caused the function to return immediately after
processing the current buffer. With the read stream, read_stream_end()
stops further look-ahead, but still waits for and releases buffers
already queued by the stream.

1. Performance point. I don't think this is a problem since there
won't be many buffers.

2. Could this cause an error from reading a block that would not
otherwise have been read because of the abort?

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ilia Evdokimov 2026-08-24 13:54:13 Re: Fix var_eq_const: sum selectivity of all matching MCV entries instead of stopping at first match
Previous Message Daniel Gustafsson 2026-08-24 13:12:11 Re: [PATCH] Fix use-after-free after failed pg_checksum_init