Re: Some read stream improvements
Kirill Reshke <reshkekirill@gmail.com>
From: Kirill Reshke <reshkekirill@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Andres Freund <andres@anarazel.de>
Date: 2025-02-17T05:55:26Z
Lists: pgsql-hackers
On Mon, 17 Feb 2025 at 09:55, Thomas Munro <thomas.munro@gmail.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
Commits
-
read_stream: Fix overflow hazard with large shared buffers
- 8ce79483dc47 18.0 landed
-
Support buffer forwarding in StartReadBuffers().
- ce1a75c4fead 18.0 landed
-
Support buffer forwarding in read_stream.c.
- ed0b87caaca1 18.0 landed
-
Simplify distance heuristics in read_stream.c.
- 799959dc7cf0 18.0 landed
-
Improve read_stream.c advice for dense streams.
- 7ea8cd15661e 18.0 landed
-
Respect changing pin limits in read_stream.c.
- 92fc6856cb4c 18.0 landed
-
Improve buffer manager API for backend pin limits.
- 01261fb07888 18.0 landed
-
Remove arbitrary cap on read_stream.c buffer queue.
- 55918f798bc2 18.0 landed