]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_visibility: Use visibilitymap_count instead of loop.
authorMasahiko Sawada <msawada@postgresql.org>
Tue, 23 Dec 2025 18:33:06 +0000 (10:33 -0800)
committerMasahiko Sawada <msawada@postgresql.org>
Tue, 23 Dec 2025 18:33:06 +0000 (10:33 -0800)
commit55c46bbf3a09a20d09d423c5dd4fded64d179d3e
tree339c5a0329b7abf975abd38d603970e510ae8246
parent67c20979ce72b8c236622e5603f9775968ff501c
pg_visibility: Use visibilitymap_count instead of loop.

This commit updates pg_visibility_map_summary() to use the
visibilitymap_count() API, replacing its own counting mechanism. This
simplifies the function and improves performance by leveraging the
vectorized implementation introduced in commit 41c51f0c68.

Author: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: wenhui qiu <qiuwenhuifx@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/CAEze2WgPu-EYYuYQimy=AHQHGa7w8EvLVve5DM5eGMR6zh-7sw@mail.gmail.com
contrib/pg_visibility/pg_visibility.c