Use streaming read I/O in BRIN vacuuming

Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>

From: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-31T16:17:20Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use streaming read I/O in BRIN vacuum scan.

Attachments

Hi,

B-tree, GiST and SP-GiST take advantage of the read stream API during
vacuuming. BRIN vacuum seems like a perfect candidate for it as well.
During a vacuum it reads the entire relation sequentially, page by
page.

PFA the patch that migrates BRIN vacuum to the read stream API.


Best regards,
Arseniy Mukhin