Re: Vacuum statistics

From: Alena Rybakina <lena(dot)ribackina(at)yandex(dot)ru>
To: Karina Litskevich <litskevichkarina(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>, Andrei Zubkov <zubkov(at)moonset(dot)ru>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, v(dot)pogozheskaya(at)postgrespro(dot)ru, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: Vacuum statistics
Date: 2026-09-24 15:10:52
Message-ID: cb305107-5935-4c34-9847-6ff0fef89f06@yandex.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Karina,
Thank you for the review!  v44 is attached.

On Wed, Sep 23, 2026 at 8:57 AM Karina Litskevich
<litskevichkarina(at)gmail(dot)com> wrote:
> CI is complaining about more than one definition of
> <table id="extvacuumstatistics-pg-stats-vacuum-indexes-columns">

Fixed, the extra table is removed from 0007.

> If you add a new external function in
> visibilitymap.c, i.e., visibilitymap_clear_rel, you should also
> add it in the INTERFACE ROUTINES list in the beginning of the file.

Done.

> I'd also suggest that the variation of the visibilitymap_clear
> function taking a Relation should be the main one (and be called
> visibilitymap_clear), and the variant taking a RelFileLocator
> should be the additional one for those who don't have a Relation
> (and be called visibilitymap_clear_no_stats or something). I am
> not insisting, though.

I left it as is for now.  Master has just changed visibilitymap_clear()
to take a RelFileLocator, and I didn't want to change it back.  I can
rename it if others prefer.

I also changed one more thing in 0004, after a question from Vlada
Pogozheskaya <v(dot)pogozheskaya(at)postgrespro(dot)ru>. vacuum_interrupt_count is
now added to the database stats in pgstat_update_dbstats(), the same way
as xact_rollback, instead of in AtEOXact_PgStat_Database().
So nothing is done during transaction abort anymore.

--
Regards,
Alena Rybakina
Yandex

Attachment Content-Type Size
v44-0001-Report-per-index-removed-tuples-in-vacuum-instru.patch text/plain 1.4 KB
v44-0002-Track-vacuum-times-for-indexes-and-databases-and.patch text/plain 36.6 KB
v44-0003-Count-wraparound-failsafe-vacuums-in-pg_stat-vie.patch text/plain 15.1 KB
v44-0004-Count-vacuums-interrupted-by-errors-in-pg_stat_d.patch text/plain 15.2 KB
v44-0005-Vacuum-report-hook-and-the-ext_vacuum_statistics.patch text/plain 64.6 KB
v44-0006-ext_vacuum_statistics-page-counters-for-tables-a.patch text/plain 17.5 KB
v44-0007-ext_vacuum_statistics-WAL-metrics-and-the-per-da.patch text/plain 59.2 KB
v44-0008-ext_vacuum_statistics-shared-buffer-access-count.patch text/plain 24.4 KB
v44-0009-Track-table-VM-stability.patch text/plain 29.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-09-24 15:11:41 convert CI CompilerWarnings job to meson
Previous Message Merlin Moncure 2026-09-24 14:50:53 Re: Up to 50x degradation in dblink performance when receiving notice traffic 19 vs 18