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