Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VsWNd-0006XQ-11 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Dec 2013 11:30:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VsWNc-0000fJ-GO for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Dec 2013 11:30:32 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VsWNa-0000dk-Bd for pgsql-hackers@postgresql.org; Mon, 16 Dec 2013 11:30:30 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VsWNO-0007eT-2r for pgsql-hackers@postgresql.org; Mon, 16 Dec 2013 11:30:28 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id DE20829FE6; Mon, 16 Dec 2013 03:30:16 -0800 (PST) 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 DD86E18352; Mon, 16 Dec 2013 03:30:16 -0800 (PST) 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 0F716C004F; Mon, 16 Dec 2013 03:30:43 -0800 (PST) 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; Mon, 16 Dec 2013 03:30:41 -0800 (PST) Message-ID: <52AEE445.1060206@vmware.com> Date: Mon, 16 Dec 2013 13:30:13 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: Alexander Korotkov CC: Alvaro Herrera , Tomas Vondra , pgsql-hackers Subject: Re: GIN improvements part 1: additional information References: <52546434.1000303@vmware.com> <52548F79.6030407@fuzzy.cz> <52569635.5090808@vmware.com> <527A03AF.9010501@vmware.com> <20131106153604.GM5809@eldon.alvh.no-ip.org> <528CEB34.7080702@vmware.com> <52950F46.2080009@vmware.com> <5298615C.7060102@vmware.com> <5298E834.4090408@vmware.com> <52A58AD5.6030808@vmware.com> <52A62771.3070800@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.4 (-------) 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 12/12/2013 06:44 PM, Alexander Korotkov wrote: > I've thought about different algorithms little more. General problem I see > is online update. We need it while it is typically not covered by > researches at all. We already have to invent small index in the end of > page. Different encoding methods adds more challenges. In general, methods > can be classified in two groups: > 1) Values aren't aligned by bytes (gamma-codes, PFOR etc.) > 2) Multiple values are packed together in small group (simple-9, simple-18) Ok. > For the first group of methods when inserting in the middle of the page we > would have to do not byte-aligned shift of right part of values. I don't > know how expensive is this shift but I expect that it would be much slower > than memmove. Agreed. > When values are packed into small groups, we have to either insert > inefficiently encoded value or re-encode whole right part of values. It would probably be simplest to store newly inserted items uncompressed, in a separate area in the page. For example, grow the list of uncompressed items downwards from pg_upper, and the compressed items upwards from pg_lower. When the page fills up, re-encode the whole page. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers