pgsql: pg_visibility: Use visibilitymap_count instead of loop. - Mailing list pgsql-committers

From Masahiko Sawada
Subject pgsql: pg_visibility: Use visibilitymap_count instead of loop.
Date
Msg-id E1vY7Cq-002HzI-0G@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Masahiko Sawada
Date:
Subject: pgsql: Toggle logical decoding dynamically based on logical slot presen
Next
From: Bruce Momjian
Date:
Subject: pgsql: C comment: fix psql "pstdout" duplicate to "pstdin"