Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Usyds-0004f2-90 for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Jun 2013 17:08:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Usydr-0000BR-Du for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Jun 2013 17:08:55 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Usydp-0000BK-Jz for pgsql-hackers@postgresql.org; Sat, 29 Jun 2013 17:08:53 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Usydh-0004sv-L1 for pgsql-hackers@postgresql.org; Sat, 29 Jun 2013 17:08:51 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 822FB28937; Sat, 29 Jun 2013 10:08:42 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 7EEA5B00BC; Sat, 29 Jun 2013 10:08:42 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 4B120C005E; Sat, 29 Jun 2013 10:08:34 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Sat, 29 Jun 2013 10:08:32 -0700 (PDT) Message-ID: <51CF1496.9020106@vmware.com> Date: Sat, 29 Jun 2013 20:08:38 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Alexander Korotkov CC: pgsql-hackers Subject: Re: GIN improvements part 1: additional information References: <51CEA13C.8040103@vmware.com> In-Reply-To: <51CEA13C.8040103@vmware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -5.5 (-----) 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 29.06.2013 11:56, Heikki Linnakangas wrote: > On 25.06.2013 01:03, Alexander Korotkov wrote: >> New revision of patch is attached. Now it includes some docs. > > Thanks! I'm looking into this in detail now. > > First, this patch actually contains two major things: > > 1. Pack item pointers more tightly on posting data leaf pages. > 2. Allow opclass implementation to attach "additional information" to > each item pointer. > > These are two very distinct features, so this patch needs to be split > into two. I extracted the 1st part into a separate patch, attached, and > am going to focus on that now. > > I made one significant change: I removed the 'freespace' field you added > to GinpageOpaque. Instead, on data leaf pages the offset from the > beginning of the page where the packed items end is stored in place of > the 'maxoff' field. This allows for quick calculation of the free space, > but there is no count of item pointers stored on the page anymore, so > some code that looped through all the item pointers relying on 'maxoff' > had to be changed to work with the end offset instead. I'm not 100% > wedded on this, but I'd like to avoid adding the redundant freespace > field on pages that don't need it, because it's confusing and you have > to remember to keep them in sync. Ah, crap, looks like I sent the wrong patch, and now I can't find the correct one anymore. The patch I sent didn't include the changes store end offset instead of freespace. I'll rewrite that part.. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers