Re: [PATCH] Use maintenance_io_concurrency for parallel index builds

From: Yuhang Qiu <iamqyh(at)gmail(dot)com>
To: Jingtang Zhang <mrdrivingduck(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Subject: Re: [PATCH] Use maintenance_io_concurrency for parallel index builds
Date: 2026-09-09 07:05:20
Message-ID: 097AEAB9-FD3E-4B58-922D-8F5AFC06A709@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jingtang,

The problem is real, and the fix LGTM.

> Passing the flag there seems to require extending the table scan
> interface

Actually, no extension is needed: table_beginscan_common() already
accepts user_flags, so heapam_index_build_range_scan() can simply
call it directly and pass SO_MAINTENANCE.

BRIN's summarize_range() also goes through
heapam_index_build_range_scan(), so fixing the serial path would
switch it over. IMO, that counts as maintenance too.

Best regards,
Yuhang Qiu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2026-09-09 07:13:10 Re: Reject WAIT FOR earlier in transaction-snapshot mode
Previous Message Jim Jones 2026-09-09 07:02:08 Re: [PATCH] Allow bare library names for non-superuser LOAD