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

2017-04-12 Thread Robert Haas
On Wed, Apr 12, 2017 at 2:28 AM, Noah Misch wrote: > [Action required within three days. This is a generic notification.] > > The above-described topic is currently a PostgreSQL 10 open item. Robert, > since you committed the patch believed to have created it, you own this open > item. If some

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

2017-04-11 Thread Noah Misch
On Thu, Apr 06, 2017 at 10:45:26AM +0530, Ashutosh Sharma wrote: > >> Based on the earlier discussions, I have prepared a patch that would > >> allow pgstathashindex() to show the number of unused pages in hash > >> index. Please find the attached patch for the same. Thanks. > > > > My idea is that

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

2017-04-05 Thread Ashutosh Sharma
Hi, >> >> Based on the earlier discussions, I have prepared a patch that would >> allow pgstathashindex() to show the number of unused pages in hash >> index. Please find the attached patch for the same. Thanks. > > My idea is that we shouldn't end up with both a zero_pages column and > an unused_

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

2017-04-05 Thread Robert Haas
On Thu, Mar 23, 2017 at 1:54 PM, Ashutosh Sharma wrote: >> Yeah, but I think "unused" might be better. Because a page could be >> in use (as an overflow page or primary bucket page) and still be >> empty. > > Based on the earlier discussions, I have prepared a patch that would > allow pgstathashi

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

2017-03-25 Thread Ashutosh Sharma
>> >> +1. If we consider some more names for that column then probably one >> alternative could be "empty pages". > > Yeah, but I think "unused" might be better. Because a page could be > in use (as an overflow page or primary bucket page) and still be > empty. > >

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

2017-03-25 Thread Amit Kapila
On Sat, Mar 25, 2017 at 12:33 PM, Ashutosh Sharma wrote: > On Sat, Mar 25, 2017 at 11:02 AM, Amit Kapila wrote: >> On Thu, Mar 23, 2017 at 11:24 PM, Ashutosh Sharma >> wrote: >>> Hi, >>> >>> On Tue, Feb 7, 2017 at 9:23 AM, Robert Haas wrote: On Mon, Feb 6, 2017 at 10:40 PM, Amit Kapila

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

2017-03-25 Thread Ashutosh Sharma
On Sat, Mar 25, 2017 at 11:02 AM, Amit Kapila wrote: > On Thu, Mar 23, 2017 at 11:24 PM, Ashutosh Sharma > wrote: >> Hi, >> >> On Tue, Feb 7, 2017 at 9:23 AM, Robert Haas wrote: >>> On Mon, Feb 6, 2017 at 10:40 PM, Amit Kapila >>> wrote: > Maybe we should call them "unused pages". >>

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

2017-03-24 Thread Amit Kapila
On Thu, Mar 23, 2017 at 11:24 PM, Ashutosh Sharma wrote: > Hi, > > On Tue, Feb 7, 2017 at 9:23 AM, Robert Haas wrote: >> On Mon, Feb 6, 2017 at 10:40 PM, Amit Kapila wrote: Maybe we should call them "unused pages". >>> >>> +1. If we consider some more names for that column then probably on

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

2017-03-23 Thread Ashutosh Sharma
Hi, On Tue, Feb 7, 2017 at 9:23 AM, Robert Haas wrote: > On Mon, Feb 6, 2017 at 10:40 PM, Amit Kapila wrote: >>> Maybe we should call them "unused pages". >> >> +1. If we consider some more names for that column then probably one >> alternative could be "empty pages". > > Yeah, but I think "unu

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

2017-02-06 Thread Robert Haas
On Mon, Feb 6, 2017 at 10:40 PM, Amit Kapila wrote: >> Maybe we should call them "unused pages". > > +1. If we consider some more names for that column then probably one > alternative could be "empty pages". Yeah, but I think "unused" might be better. Because a page could be in use (as an overf

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

2017-02-06 Thread Amit Kapila
On Tue, Feb 7, 2017 at 2:04 AM, Robert Haas wrote: > On Sun, Feb 5, 2017 at 11:36 PM, Ashutosh Sharma > wrote: >>> Committed with those changes. >> >> Thanks for above corrections and commit. But, There are couple of >> things that we might have to change once the patch for 'WAL in Hash >> Index

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

2017-02-06 Thread Robert Haas
On Sun, Feb 5, 2017 at 11:36 PM, Ashutosh Sharma wrote: >> Committed with those changes. > > Thanks for above corrections and commit. But, There are couple of > things that we might have to change once the patch for 'WAL in Hash > Indexes' gets checked-in. > > 1) The test-case result needs to be c

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

2017-02-05 Thread Amit Kapila
On Mon, Feb 6, 2017 at 10:06 AM, Ashutosh Sharma wrote: > On Sat, Feb 4, 2017 at 1:12 AM, Robert Haas wrote: >> >> Committed with those changes. > > Thanks for above corrections and commit. But, There are couple of > things that we might have to change once the patch for 'WAL in Hash > Indexes' g

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

2017-02-05 Thread Ashutosh Sharma
On Sat, Feb 4, 2017 at 1:12 AM, Robert Haas wrote: > On Wed, Feb 1, 2017 at 10:13 PM, Michael Paquier > wrote: >> On Tue, Jan 24, 2017 at 8:36 PM, Kuntal Ghosh >> wrote: >>> Nothing else to add from my side. I'm marking this 'Ready for commiter'. >> >> Moved to CF 2017-03 with the same status. >

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

2017-02-03 Thread Robert Haas
On Wed, Feb 1, 2017 at 10:13 PM, Michael Paquier wrote: > On Tue, Jan 24, 2017 at 8:36 PM, Kuntal Ghosh > wrote: >> Nothing else to add from my side. I'm marking this 'Ready for commiter'. > > Moved to CF 2017-03 with the same status. OK, I took a look at this. - The handling of the extension s

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

2017-02-01 Thread Michael Paquier
On Tue, Jan 24, 2017 at 8:36 PM, Kuntal Ghosh wrote: > Nothing else to add from my side. I'm marking this 'Ready for commiter'. Moved to CF 2017-03 with the same status. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http

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

2017-01-24 Thread Kuntal Ghosh
On Tue, Jan 24, 2017 at 10:09 AM, Ashutosh Sharma wrote: >> I've looked at the patch. It looks good. However, I was wondering why >> an exclusive lock for extension is necessary for reading the number >> blocks in this case. Please refer to the following code. >> >> + /* Get the current rela

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

2017-01-23 Thread Ashutosh Sharma
> I've looked at the patch. It looks good. However, I was wondering why > an exclusive lock for extension is necessary for reading the number > blocks in this case. Please refer to the following code. > > + /* Get the current relation length */ > + LockRelationForExtension(rel, Exclusiv

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

2017-01-23 Thread Kuntal Ghosh
On Mon, Jan 23, 2017 at 2:56 PM, Ashutosh Sharma wrote: > 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. > I've looked at the patch. It l

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

2017-01-23 Thread Ashutosh Sharma
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. commit f21a563d25dbae153937aec062161184189478b8 Author: Peter Eisentraut Date: Fri Jan 20 20:

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

2017-01-18 Thread Ashutosh Sharma
> 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(HashPageOpaque

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

2017-01-18 Thread Kuntal Ghosh
On Fri, Jan 6, 2017 at 6:58 PM, Ashutosh Sharma 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 + * spa

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

2017-01-06 Thread Ashutosh Sharma
Hi, > I think the calculation for max available spcae is wrong here. You > should subtract the page header and special area from the total page size. > A check for non-zero denominator should be added while calculating the > percentage. > There can be multiple bitmap pages. Right? Yes, we can hav

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

2017-01-05 Thread Kuntal Ghosh
On Wed, Dec 21, 2016 at 7:22 PM, Ashutosh Sharma wrote: > Hi All, > > I have introduced a new function 'pgstathashindex()' inside pgstatuple > extension to view the statistics related to hash index table. > I think this feature is going to be helpful. I've some initial review for the patch. I've n