Re: a verbose option for autovacuum
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Euler Taveira <euler@eulerto.com>
Cc: Tommy Li <tommy@coffeemeetsbagel.com>, Stephen Frost <sfrost@snowman.net>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-10T03:46:31Z
Lists: pgsql-hackers
Attachments
- index_stats_log.patch (application/octet-stream) patch
On Tue, Mar 9, 2021 at 12:58 AM Euler Taveira <euler@eulerto.com> wrote: > > On Mon, Mar 8, 2021, at 2:32 AM, Masahiko Sawada wrote: > > * Proposed idea > LOG: automatic vacuum of table "postgres.public.test": index scans: 1 > pages: 0 removed, 443 remain, 0 skipped due to pins, 0 skipped frozen > tuples: 1000 removed, 99000 remain, 0 are dead but not yet removable, > oldest xmin: 545 > indexes: "postgres.public.test_idx1" 276 pages, 0 newly deleted, 0 > currently deleted, 0 reusable. > "postgres.public.test_idx2" 300 pages, 10 newly deleted, 0 currently > deleted, 3 reusable. > "postgres.public.test_idx2" 310 pages, 4 newly deleted, 0 currently > deleted, 0 reusable. > > Instead of using "indexes:" and add a list of indexes (one on each line), it > would be more parse-friendly if it prints one index per line using 'index > "postgres.public.idxname" 123 pages, 45 newly deleted, 67 currently deleted, 8 > reusable.'. Agreed. Attached a patch. I've slightly modified the format for consistency with heap statistics. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/
Commits
-
Add per-index stats information in verbose logs of autovacuum
- 5aed6a1fc214 14.0 landed
-
VACUUM ANALYZE: Always update pg_class.reltuples.
- 5f8727f5a679 14.0 cited