Add pgstathashindex() to get hash index table statistics.

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Add pgstathashindex() to get hash index table statistics.
Date: 2016-12-21 13:52:05
Message-ID: CAE9k0Pm8NWvPF2KCGVCpb6OivE=Gdg-eQ_cLz7UMhxuDOq_1YQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hi All,

I have introduced a new function 'pgstathashindex()' inside pgstatuple
extension to view the statistics related to hash index table. I could
have used 'pgstattuple()' function to view hash index stats instead of
adding this new function but there are certain limitations when using
pgstattuple() for hash indexes. Firstly, it doesn't work if a hash
index contains zero or new pages which is very common in case of hash
indexes. Secondly, it doesn't provide information about different
types of pages in hash index and its count. Considering these points,
I have thought of introducing this function. Attached is the patch for
the same. Please have a look and let me your feedback. I would also
like to mention that this idea basically came from my colleague Kuntal
Ghosh and i implemented it. I have also created a commit-fest entry
for this submission. Thanks.

With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

Attachment Content-Type Size
0001-Add-pgstathashindex-to-pgstattuple-extension-v1.patch text/x-patch 15.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-12-21 14:00:21 Re: Parallel tuplesort (for parallel B-Tree index creation)
Previous Message Craig Ringer 2016-12-21 13:50:38 Re: Replication slot xmin is not reset if HS feedback is turned off while standby is shut down