From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_visibility: Use visibilitymap_count instead of loop.
Date: Tue, 23 Dec 2025 18:34:01 +0000
Message-ID: <E1vY7Cq-002HzI-0G@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/55c46bbf3a09a20d09d423c5dd4fded64d179d3e
Modified Files
--------------
contrib/pg_visibility/pg_visibility.c | 31 +++++--------------------------
1 file changed, 5 insertions(+), 26 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_visibility: Use visibilitymap_count instead of loop.
In-Reply-To: <E1vY7Cq-002HzI-0G@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox