On Tue, Mar 9, 2021 at 12:58 AM Euler Taveira <eu...@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/

Attachment: index_stats_log.patch
Description: Binary data

Reply via email to