pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: pageinspect: Hash index support
Date: Fri, 23 Sep 2016 08:41:38 -0400
Message-ID: <05d0b6f8-4254-e2b5-5602-aa140783c81c@2ndquadrant.com> (raw)
In-Reply-To: <CAA4eK1KGzi+SFP2wVi9h4mpL68b2_b7nTPksgJdYmwcWtnoJUQ@mail.gmail.com>
References: <e2ac6c58-b93f-9dd9-f4e6-d6d30add7fdf@redhat.com>
	<20160830170633.GA508711@alvherre.pgsql>
	<CAMkU=1wghadVOxkphJTQUqukgNkE7ETPci0g55Y+fqXO4Q43PQ@mail.gmail.com>
	<0f99b6b0-0e54-0f6e-9502-f8cb6f194c17@redhat.com>
	<CAB7nPqSLVbe-wXCd77CMx6vHKfRd6thUwv7nzP54Lv9k4Q6hww@mail.gmail.com>
	<3493caf5-6d50-8915-7612-bd830972f513@redhat.com>
	<CAMkU=1weMVE+Re7NQyAtXT5g6E5Fziw9PVU9UDapb0AG5MH=YQ@mail.gmail.com>
	<CAE9k0Pk4dC9VrzV7Vm6em7JFzRMGfzx2=eYu0Yb_Psga-W47Ww@mail.gmail.com>
	<e1bda3f7-dc99-c610-4d48-58815f5b7515@redhat.com>
	<CAE9k0P=OQSEj0x9z91tvE9P1f-Ht7x7z8X+eDWQGTJNSFbn9yg@mail.gmail.com>
	<5d64a536-cc90-ce96-b68f-5b6bd3206476@redhat.com>
	<CAB7nPqTT3ZEm8QKsYYxfUnWL+P3p2mAbud7AFiZpK_JKx3eADA@mail.gmail.com>
	<d235dcd6-146a-1269-73a0-da9a55bfeddc@redhat.com>
	<80a00b5c-56d3-dffb-8dba-edf5d2167b12@2ndquadrant.com>
	<CAA4eK1KGzi+SFP2wVi9h4mpL68b2_b7nTPksgJdYmwcWtnoJUQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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



view thread (110+ messages)  latest in thread

Message-ID: <05d0b6f8-4254-e2b5-5602-aa140783c81c@2ndquadrant.com>
Permalink:  ../05d0b6f8-4254-e2b5-5602-aa140783c81c@2ndquadrant.com/
Also on:    postgresql.org/message-id/05d0b6f8-4254-e2b5-5602-aa140783c81c@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, amit.kapila16@gmail.com, jesper.pedersen@redhat.com, michael.paquier@gmail.com, ashu.coek88@gmail.com, jeff.janes@gmail.com, alvherre@2ndquadrant.com
  Subject: Re: pageinspect: Hash index support
  In-Reply-To: <05d0b6f8-4254-e2b5-5602-aa140783c81c@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox