Re: GIN improvements part 1: additional information

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIN improvements part 1: additional information
Date: 2014-01-24 08:53:26
Message-ID: CAPpHfdugQ=dWDNf_=DFd5sj6yg=vajtY-xg9AXeJXY=02DsT=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 24, 2014 at 12:50 PM, Heikki Linnakangas <
hlinnakangas(at)vmware(dot)com> wrote:

> 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.

OK. What about previous fix in assert?

------
With best regards,
Alexander Korotkov.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2014-01-24 08:57:49 Re: extension_control_path
Previous Message Heikki Linnakangas 2014-01-24 08:50:48 Re: GIN improvements part 1: additional information