Re: Add pgstathashindex() to get hash index table statistics.
Ashutosh Sharma <ashu.coek88@gmail.com>
From: Ashutosh Sharma <ashu.coek88@gmail.com>
To: Kuntal Ghosh <kuntalghosh.2007@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-19T06:57:18Z
Lists: pgsql-hackers
Attachments
- 0001-Add-pgstathashindex-to-pgstattuple-extension-v3.patch (invalid/octet-stream) patch v3-0001
- (unnamed) (text/plain)
> However, I've some minor comments on the patch: > > +/* > + * HASH_ALLOCATABLE_PAGE_SZ represents allocatable > + * space (pd_upper - pd_lower) on a hash page. > + */ > +#define HASH_ALLOCATABLE_PAGE_SZ \ > + BLCKSZ - \ > + (SizeOfPageHeaderData + sizeof(HashPageOpaqueData)) > My suggestion will be not to write "(pd_upper - pd_lower)" in the > comment. You may write allocatable space on a empty hash page. Accepted. Have changed the comment accordingly. > > + buf = ReadBufferExtended(rel, MAIN_FORKNUM, blkno, > RBM_NORMAL, NULL); > Use BAS_BULKREAD strategy to read the buffer. > okay, corrected. Please check the attached v3 patch with corrections. With Regards, Ashutosh Sharma EnterpriseDB: http://www.enterprisedb.com
Commits
-
Fix pgstattuple's handling of unused hash pages.
- 9cc27566c1a8 10.0 landed
-
Move some things from builtins.h to new header files
- f21a563d25db 10.0 cited