bloom: Optimize VACUUM and bulk-deletion with streaming read

Michael Paquier <michael@paquier.xyz>

Commit: d841ca2d149666b823525e7f5258efd9ef9d7fb1
Author: Michael Paquier <michael@paquier.xyz>
Date: 2026-03-12T03:00:22Z
bloom: Optimize VACUUM and bulk-deletion with streaming read

This commit replaces the synchronous ReadBufferExtended() loops done in
blbulkdelete() and blvacuumcleanup() with the streaming read equivalent,
to improve I/O efficiency during bloom index vacuum cleanup operations.

Under the same test conditions as 6c228755add8, the runtime is proving
to gain around 30% better, with most the benefits coming from a large
reduction of the IO operation based on the stats retrieved in the
scenarios run.

Author: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/CABPTF7VrqfbcDXqGrdLQ2xaQ=K0RzExNuw6U_GGqzSJu32wfdQ@mail.gmail.com

Files

PathChange+/−
contrib/bloom/blvacuum.c modified +51 −4

Discussion