Re: Some read stream improvements

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Some read stream improvements
Date: 2025-02-17 05:55:26
Message-ID: CALdSSPh1vLnh31_itFvOwrndwtMsQvx2a5A8ue7uUMpmJ6oeng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 17 Feb 2025 at 09:55, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
>
> Hi,
>
> Here are some patches that address some of Andres's feedback since the
> AIO v2 rebase[1], anticipate out-of-order streams, and make some other
> minor improvements. They are independent of the main AIO patch set
> and apply to master, hence separate thread.

Hi, great!

> 0001-Refactor-read_stream.c-s-circular-arithmetic.patch
>
> This just replaced open-coded arithmetic with inline functions. They
> will be used a lot more in later work, and provide central places to
> put assertions that were not checked as uniformly as I would like.

Just out of curiosity, should we `Assert(*index + n <
stream->queue_size);` in `read_stream_index_advance_n`?

--
Best regards,
Kirill Reshke

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2025-02-17 05:57:46 Re: Some read stream improvements
Previous Message Kirill Reshke 2025-02-17 05:19:07 Re: Get rid of WALBufMappingLock