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

From: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
To: Ashutosh Sharma <ashu(dot)coek88(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-18 10:13:50
Message-ID: CAGz5QC+z_s4yk29-0MWpPZF-Bw7YLw66W7iuT22+Eyp9dx8gtA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 6, 2017 at 6:58 PM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:

I've successfully applied the patch on the latest head and ran a
regression tests without any failure. There is no major changes.
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.

+ buf = ReadBufferExtended(rel, MAIN_FORKNUM, blkno,
RBM_NORMAL, NULL);
Use BAS_BULKREAD strategy to read the buffer.

--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladimir Rusinov 2017-01-18 11:15:39 Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal
Previous Message Ants Aasma 2017-01-18 10:11:12 Re: emergency outage requiring database restart