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

From Andres Freund
Subject Re: Allow io_combine_limit up to 1MB
Date
Msg-id nynhk25a4h4wc53z35rhk2mwx6kwuwlisinw6enqkmfsdvqtqv@4yuezuoahhne
Whole thread Raw
In response to Re: Allow io_combine_limit up to 1MB  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Allow io_combine_limit up to 1MB
List pgsql-hackers
Hi,

On 2025-04-25 10:26:09 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > void
> > assign_io_max_combine_limit(int newval, void *extra)
> > {
> >     io_max_combine_limit = newval;
> >     io_combine_limit = Min(io_max_combine_limit, io_combine_limit_guc);
> > }
> > void
> > assign_io_combine_limit(int newval, void *extra)
> > {
> >     io_combine_limit_guc = newval;
> >     io_combine_limit = Min(io_max_combine_limit, io_combine_limit_guc);
> > }
> 
> > So we end up with a larger io_combine_limit than
> > io_max_combine_limit. Hilarity ensues.
> 
> There's another thing that's rather tin-eared about these assign
> hooks: the hook is not supposed to be setting the GUC variable by
> itself.

Agreed. Without that the bug would have been more apparent... Pushed the fix,
alongside the change you outlined.

It's kinda sad to not have any test that tests a larger
io_combine_limit/io_max_combine_limit - as evidenced by this bug that'd be
good. However, not all platforms have PG_IOV_MAX > 16, so it seems like it'd
be somewhat painful to test?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Conflicting updates of command progress
Next
From: Tom Lane
Date:
Subject: gcc 15 "array subscript 0" warning at level -O3