Re: Allow io_combine_limit up to 1MB
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Tomas Vondra <tomas@vondra.me>
Date: 2025-03-03T08:11:00Z
Lists: pgsql-hackers
Attachments
- v3-0001-Fix-read_stream.c-for-changing-io_combine_limit.patch (text/x-patch) patch v3-0001
- v3-0002-Introduce-max_io_combine_limit.patch (text/x-patch) patch v3-0002
- v3-0003-Increase-io_combine_limit-maximum-to-1MB.patch (text/x-patch) patch v3-0003
On Wed, Feb 12, 2025 at 3:24 PM Thomas Munro <thomas.munro@gmail.com> wrote: > On Wed, Feb 12, 2025 at 3:22 PM Andres Freund <andres@anarazel.de> wrote: > > On 2025-02-12 13:59:21 +1300, Thomas Munro wrote: > > > How about just maintaining it in a new variable > > > effective_io_combine_limit, whenever either of them is assigned? > > > > Yea, that's probably the least bad way. > > > > I wonder if we should just name that variable io_combine_limit and have the > > GUC be _raw or _guc or such? There's gonna be a fair number of references to > > the variable in code... > > Alternatively, we could compute that as stream->io_combine_limit and > use that. That has the advantage that it's fixed for the life of the > stream, even if you change it (eg between fetches from a CURSOR that > has streams). Pretty sure it won't break anything today, Unfortunately that turned out to be untrue. :-( 0001 is a patch to address that, which should be back-patched. It's hard to come up with a repro for an actual problem, but I'm sure it's possible, will try... 0002 and 0003 are new versions of the patches to add max_io_combine_limit and increase MAX_IO_COMBINE_LIMIT to 1MB. This time using the name io_combine_limit_guc, so that io_combine_limit remains as the name referred to in the rest of the tree. I imagine/hope that we'll one day figure out how to make at least the easy case (?) of dependencies on PGC_POSTMASTER GUCs work for PGC_USERSET values, and then io_combine_limit_guc could be deleted...
Commits
-
Fix bug allowing io_combine_limit > io_max_combine_combine limit
- 500b61769fa2 18.0 landed
-
Increase io_combine_limit range to 1MB.
- 06fb5612c970 18.0 landed
-
Introduce io_max_combine_limit.
- 10f664684751 18.0 landed
-
Fix read_stream.c for changing io_combine_limit.
- e273468070ab 17.5 landed
- 75da2bece670 18.0 landed