Re: WIP: Fast GiST index build

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Fast GiST index build
Date: 2011-07-15 10:04:44
Message-ID: CAPpHfdszFQ7KyWurN7+AMSdG-v4m-p=HgpLPH=XUZqbnGJf+og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fri, Jul 15, 2011 at 12:53 AM, Heikki Linnakangas <
heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

> On 14.07.2011 23:41, Alexander Korotkov wrote:
>
>> Do you think using "rightlink" as pointer to parent page is possible
>> during
>> index build? It would allow to simplify code significantly, because of no
>> more need to maintain in-memory structures for parents memorizing.
>>
>
> I guess, but where do you store the rightlink, then? Would you need a final
> pass through the index to fix all the rightlinks?
>
> I think you could use the NSN field. It's used to detect concurrent page
> splits, but those can't happen during index build, so you don't need that
> field during index build. You just have to make it look like an otherwise
> illegal NSN, so that it won't be mistaken for a real NSN after the index is
> built. Maybe add a new flag to mean that the NSN is actually invalid.

Thank you for advice. But I didn't take into account that in this case I
need to update parent link in many pages(which might be not in cache) on
split. Seems that I still need to maintain some in-memory structures for
parent finding.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2011-07-15 10:15:09 Re: Re: patch review : Add ability to constrain backend temporary file space
Previous Message Alexander Korotkov 2011-07-15 10:01:16 Re: Small patch for GiST: move childoffnum to child