Re: Add pgstathashindex() to get hash index table statistics.

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add pgstathashindex() to get hash index table statistics.
Date: 2017-01-23 09:26:40
Message-ID: CAE9k0Pnta2Y8Y==f1pWA8p-95er84CE=gB4aqStRAhTN0LYmRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Please find the attached v4 patch rebased on a latest commitID in
head. I had to rebase it as the following git commit has some changes
in pgstatindex.c file due to which 'git apply' was failing.

<git-commit>
commit f21a563d25dbae153937aec062161184189478b8
Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
Date: Fri Jan 20 20:29:53 2017 -0500

Move some things from builtins.h to new header files

</git-commit>

On Thu, Jan 19, 2017 at 12:27 PM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:
>> 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

Attachment Content-Type Size
0001-Add-pgstathashindex-to-pgstattuple-extension-v4.patch application/octet-stream 17.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kuntal Ghosh 2017-01-23 09:51:40 Re: Gather Merge
Previous Message Amit Kapila 2017-01-23 09:19:36 Re: Fix a comment in feelist.c