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

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
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-25 06:08:30
Message-ID: 13F428EB-3A10-4D31-AC02-C76D9F751B89@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nazir,

On Mon, Aug 24, 2026 at 6:13 PM Nazir Bilal Yavuz wrote:
> 2. Could this cause an error from reading a block that would not
> otherwise have been read because of the abort?

Yes. read_stream_end() drains queued reads, so WaitReadBuffers() can
report an error from a prefetched block after the abort request.

The relation is locked against truncation and the callback is bounded by
the initial numblocks, so this can only expose an actual I/O error for a
valid relation block, not an out-of-range read.
Thank you for pointing this aspect.

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-08-25 06:12:06 Re: Walreceiver create temp slot more than once when timeline switch
Previous Message Andrey Borodin 2026-08-25 05:51:42 Re: Bug? pg_rewind produces unusable but starting database with standby recovery