Re: Allow io_combine_limit up to 1MB - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Allow io_combine_limit up to 1MB
Date
Msg-id CA+hUKGLtHoRZyzN6jJBLVPDFNO_uOKQdW4ytUmSNvSLA0cZPtg@mail.gmail.com
Whole thread Raw
In response to Re: Allow io_combine_limit up to 1MB  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
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...

Attachment

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: Selectively invalidate caches in pgoutput module
Next
From: Andrei Lepikhov
Date:
Subject: Re: MergeJoin beats HashJoin in the case of multiple hash clauses