pgsql: Count pages set all-visible and all-frozen in VM during vacuum

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Count pages set all-visible and all-frozen in VM during vacuum
Date: 2024-12-17 19:21:18
Message-ID: E1tNd8A-0004wB-4P@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Count pages set all-visible and all-frozen in VM during vacuum

Heap vacuum already counts and logs pages with newly frozen tuples. Now
count and log the number of pages newly set all-visible and all-frozen
in the visibility map.

Pages that are all-visible but not all-frozen are debt for future
aggressive vacuums. The counts of newly all-visible and all-frozen pages
give us insight into the rate at which this debt is being accrued and
paid down.

Author: Melanie Plageman
Reviewed-by: Masahiko Sawada, Alastair Turner, Nitin Jadhav, Andres Freund, Bilal Yavuz, Tomas Vondra
Discussion: https://postgr.es/m/flat/CAAKRu_ZQe26xdvAqo4weHLR%3DivQ8J4xrSfDDD8uXnh-O-6P6Lg%40mail.gmail.com#6d8d2b4219394f774889509bf3bdc13d,
https://postgr.es/m/ctdjzroezaxmiyah3gwbwm67defsrwj2b5fpfs4ku6msfpxeia%40mwjyqlhwr2wu

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dc6acfd910b868351f115382fd92f95e5345992c

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 123 +++++++++++++++++++++++++++++++----
1 file changed, 111 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-12-17 20:52:25 pgsql: Skip useless calculation of join RTE column names during EXPLAIN
Previous Message Tom Lane 2024-12-17 17:23:35 pgsql: Set max_safe_fds whenever we create shared memory and semaphores