Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6cTb-0007Wg-Dc for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Jan 2014 08:50:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W6cTa-0002Ae-U5 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Jan 2014 08:50:58 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6cTZ-0002AW-E1 for pgsql-hackers@postgresql.org; Fri, 24 Jan 2014 08:50:57 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6cTW-00044j-Iu for pgsql-hackers@postgresql.org; Fri, 24 Jan 2014 08:50:56 +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 26E6F28EE9; Fri, 24 Jan 2014 00:50:53 -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 22DAE18446; Fri, 24 Jan 2014 00:50:53 -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 6464EC0051; Fri, 24 Jan 2014 00:51:31 -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; Fri, 24 Jan 2014 00:51:29 -0800 (PST) Message-ID: <52E22968.2050100@vmware.com> Date: Fri, 24 Jan 2014 10:50:48 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: Alexander Korotkov CC: Tomas Vondra , pgsql-hackers Subject: Re: GIN improvements part 1: additional information References: <52B49C34.8060300@vmware.com> <52D0A947.6050706@fuzzy.cz> <52D478F2.6070005@fuzzy.cz> <52D5E1BC.3000208@fuzzy.cz> <52D9789E.3030202@vmware.com> <52DDD51E.2080408@fuzzy.cz> <52DE3F55.80103@vmware.com> <52DEE4BF.6010203@vmware.com> <52DF819E.4070507@vmware.com> <52DFFFD0.6020708@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.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 01/24/2014 10:03 AM, Alexander Korotkov wrote: > ITSM I found this bug. ginVacuumPostingTreeLeaf re-encodes only some > segments. Others are not even re-palloced. They are moved left > in dataPlaceToPageLeafRecompress by memcpy. But it's incorrect to with > memcpy, proper solution is memmove. Using memcpy platform dependently can > lead to page corruption. Another solution is to re-palloc segments in > ginVacuumPostingTreeLeaf. Good catch. Thanks, committed, changing memcpy to memmove. Will have to switch to pallocing everything in the future, if we make leafRepackItems smarter, so that it doesn't rewrite all the segments after the first modified one. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers