Re: Metadata and record block access stats for indexes

From: Mircea Cadariu <cadariu(dot)mircea(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Metadata and record block access stats for indexes
Date: 2025-07-04 16:00:02
Message-ID: f3eb8416-5098-4732-be10-8758ecc71b04@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Just attaching v2 of the patch.  It’s a trimmed down version compared to
what I started with.  For context, this is the original discussion on
which this work is based on:
https://www.postgresql.org/message-id/flat/CAH2-WzmdZqxCS1widYzjDAM%2BZ-Jz%3DejJoaWXDVw9Qy1UsK0tLA%40mail.gmail.com

After applying the patch, you can run the following:

create table test (id bigint primary key);
insert into test select * from generate_series(1, 10_000);
select * from pg_statio_all_indexes where indexrelname = 'test_pkey';

The result will contain a new column: idx_metadata_blks.

Looking forward to your feedback.

Thanks,
Mircea

Attachment Content-Type Size
v2-0001-Add-metadata-non-leaf-index-block-statistics-to-p.patch text/plain 40.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-07-04 16:00:04 Re: Assertion failure during initdb with transaction_timeout set
Previous Message Fujii Masao 2025-07-04 15:57:31 Re: A assert failure when initdb with track_commit_timestamp=on