Re: Don't synchronously wait for already-in-progress IO in read stream

From: Andres Freund <andres(at)anarazel(dot)de>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>, Tomas Vondra <tv(at)fuzzy(dot)cz>
Subject: Re: Don't synchronously wait for already-in-progress IO in read stream
Date: 2026-03-31 12:43:33
Message-ID: 6yhrh2q7tb2fxszsyjg34uzt66ejbbk4j6tmwov6xaezunzvxx@ghohuopucefv
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-03-30 18:37:27 -0400, Melanie Plageman wrote:
> On Mon, Mar 30, 2026 at 3:14 PM Melanie Plageman
> <melanieplageman(at)gmail(dot)com> wrote:
> >
> > On Mon, Mar 30, 2026 at 3:00 PM Alexander Lakhin <exclusion(at)gmail(dot)com> wrote:
> > >
> > > As copperhead showed [1], tests added in 020c02bd9 fail when postgres is
> > > built without --enable-cassert. I've reproduced the failure locally with:
> >
> > Yes, it's because read_buffers() (in test_aio.c) uses
> > operation->nblocks and that's only intialized for buffer hits in
> > assert builds. The test code could just use the correctly initialized
> > nblocks out parameter.
>
> Fix was a little more invasive than that. Looks like we were using
> operation in more places than I thought. See attached.

Looks good to me.

Will you push?

Greetings,

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2026-03-31 12:52:41 Re: pgsql: test_aio: Add basic tests for StartReadBuffers()
Previous Message Daniel Gustafsson 2026-03-31 12:42:32 Re: Changing the state of data checksums in a running cluster