Re: Allow io_combine_limit up to 1MB

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Allow io_combine_limit up to 1MB
Дата
Msg-id nynhk25a4h4wc53z35rhk2mwx6kwuwlisinw6enqkmfsdvqtqv@4yuezuoahhne
обсуждение исходный текст
Ответ на Re: Allow io_combine_limit up to 1MB  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Allow io_combine_limit up to 1MB
Список 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 по дате отправления: