Vectorize pg_visibility.pg_visibility_map_summary - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Vectorize pg_visibility.pg_visibility_map_summary
Date
Msg-id CAEze2WgPu-EYYuYQimy=AHQHGa7w8EvLVve5DM5eGMR6zh-7sw@mail.gmail.com
Whole thread Raw
Responses Re: Vectorize pg_visibility.pg_visibility_map_summary
List pgsql-hackers
Hi,

Whilst working on fixing a bug in GiST and SP-GiST's index-only scan
systems, I noticed that pg_visibility is sometimes rather wasteful
with the APIs which it calls into; especially now that there are more
optimized APIs available.

Here's one small patch that makes it use the visibilitymap_count() API
for pg_visibility_map_summary(), replacing its own bespoke counting
mechanism with the primary implementation that has vectorized
optimizations, thus reducing the overhead of
pg_visibility_map_summary.

CC-ed to authors of 41c51f0c68, visibilitymap_count was optimized, and
this potential user wasn't notified of that.


Kind regards,

Matthias van de Meent
Databricks (https://www.databricks.com)

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Orphaned records in pg_replication_origin_status after subscription drop
Next
From: Thomas Munro
Date:
Subject: Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain