1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

pgstattuple: Add pgstathashindex.

Since pgstattuple v1.5 hasn't been released yet, no need for a new
extension version.  The new function exposes statistics about hash
indexes similar to what other pgstatindex functions return for other
index types.

Ashutosh Sharma, reviewed by Kuntal Ghosh.  Substantial further
revisions by me.
This commit is contained in:
Robert Haas
2017-02-03 14:35:25 -05:00
parent 39b8cc991f
commit e759854a09
5 changed files with 318 additions and 0 deletions

View File

@ -130,3 +130,11 @@ select * from pgstatginindex('test_ginidx');
2 | 0 | 0
(1 row)
create index test_hashidx on test using hash (b);
WARNING: hash indexes are not WAL-logged and their use is discouraged
select * from pgstathashindex('test_hashidx');
version | bucket_pages | overflow_pages | bitmap_pages | zero_pages | live_items | dead_items | free_percent
---------+--------------+----------------+--------------+------------+------------+------------+--------------
2 | 4 | 0 | 1 | 0 | 0 | 0 | 100
(1 row)