Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTcKM-0005Ez-Mi for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2013 18:48:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VTcKL-0001R6-VX for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2013 18:48:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTcKK-0001Pe-Dw for pgsql-hackers@postgresql.org; Tue, 08 Oct 2013 18:48:12 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTcKG-0005L9-Km for pgsql-hackers@postgresql.org; Tue, 08 Oct 2013 18:48:12 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 478B529DDA; Tue, 8 Oct 2013 11:48:05 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 424A218285; Tue, 8 Oct 2013 11:48:05 -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 48FFFC0060; Tue, 8 Oct 2013 11:48:17 -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; Tue, 8 Oct 2013 11:48:16 -0700 (PDT) Message-ID: <52545362.4080806@vmware.com> Date: Tue, 08 Oct 2013 21:48:02 +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> <524E7C3B.7060402@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.2 (-------) 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 04.10.2013 14:13, Alexander Korotkov wrote: > On Fri, Oct 4, 2013 at 12:28 PM, Heikki Linnakangas> wrote: > >> In the attached patch, I in fact already did that for data leaf pages, but >> didn't change the format of non-leaf pages yet. If we want to support >> pg_upgrade, we might want to refrain from changing the non-leaf format. > > In GinDataLeafPageGetPostingList* you use sizeof(ItemPointerData) without > MAXALIGN. Is it an error or you especially use 2 extra bytes on leaf page? I didn't even think of it. Now that I do think of it, I don't see a reason to use MAXALIGN there. PostingItems only require 2-byte alignment. It's a bit fragile and underdocumented though. It probably would be good to have a struct to represent that layout. Something like: struct { ItemPointerData rightBound; PostingItem postingItems[1]; /* variable length array */ } PostingItemPageContent; And use that struct in the macros. Then again, we do currently use MAXALIGN there, so if we want to avoid changing the on-disk format, we have to keep it... - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers