Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnPna-0000sx-1k for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Sep 2016 12:41:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bnPnZ-0006c9-8a for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Sep 2016 12:41:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnPnX-0006bC-JF for pgsql-hackers@postgresql.org; Fri, 23 Sep 2016 12:41:47 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnPnR-0006OH-9D for pgsql-hackers@postgresql.org; Fri, 23 Sep 2016 12:41:46 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 3F8652075D; Fri, 23 Sep 2016 08:41:40 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 23 Sep 2016 08:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=b4MOExtqupQ/kCr tGlbXwD0U6IE=; b=Nnrkcijx/JQQ3vNrSnbBNg1AaQEV1y35aFXDVzG5LHGiVAq 8PdLKhLZQpy/hSxc9+TZzVfAOrrILBsA6zI2MHURZuG4SQQW8CRDGOBfl9nK4qsS gqHExmP4/lBmMzRDYo7V01z/e89NyLx01jZ+SIFukmCM2u4MvEKOQY28nK0g= X-Sasl-enc: aET4DbdRGgwqu85wywG7QuSId8ux3OpMJT0llC9Obtuj 1474634499 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id BD588CCE9E; Fri, 23 Sep 2016 08:41:39 -0400 (EDT) Subject: Re: pageinspect: Hash index support To: Amit Kapila References: <20160830170633.GA508711@alvherre.pgsql> <0f99b6b0-0e54-0f6e-9502-f8cb6f194c17@redhat.com> <3493caf5-6d50-8915-7612-bd830972f513@redhat.com> <5d64a536-cc90-ce96-b68f-5b6bd3206476@redhat.com> <80a00b5c-56d3-dffb-8dba-edf5d2167b12@2ndquadrant.com> Cc: Jesper Pedersen , Michael Paquier , Ashutosh Sharma , Jeff Janes , Alvaro Herrera , PostgreSQL Hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <05d0b6f8-4254-e2b5-5602-aa140783c81c@2ndquadrant.com> Date: Fri, 23 Sep 2016 08:41:38 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 9/23/16 1:56 AM, Amit Kapila wrote: > On Fri, Sep 23, 2016 at 9:40 AM, Peter Eisentraut >> - hash_metap result fields spares and mapp should be arrays of integer. >> > > how would you like to see both those arrays in tuple, right now, I > think Jesper's code is showing it as string. I'm not sure what you are asking here. >> (Incidentally, the comment in hash.h talks about bitmaps[] but I think >> it means hashm_mapp[].) >> > > which comment are you referring here? hashm_mapp contains block > numbers of bitmap pages. The comment I'm referring to says The blknos of these bitmap pages are kept in bitmaps[]; nmaps is the number of currently existing bitmaps. But there is no "bitmaps" field anywhere. > In the above code, it appears that you are trying to calculate > max_avail space for all pages in same way. Don't you need to > calculate it differently for bitmap page or meta page as they don't > share the same format as other type of pages? Is this even useful for hash indexes? This idea came from btrees. Neither the gin nor the brin code have this. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers