Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-05-06 Thread Alexander Korotkov
2011/5/6 Teodor Sigaev > As I understood it's because we can't move root to another page. >> > > Actually not. Path to node could change completely, For example, for page > on second level path is 0-234 (where 0 is a root page, 234 is a page on > second level). After root split path will be 0-ne

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-05-06 Thread Teodor Sigaev
As I understood it's because we can't move root to another page. Actually not. Path to node could change completely, For example, for page on second level path is 0-234 (where 0 is a root page, 234 is a page on second level). After root split path will be 0-new_page-234. If algorithm could b

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-05-05 Thread Alexander Korotkov
2011/5/5 Teodor Sigaev > > See several lines above: >if (parent->blkno == InvalidBlockNumber) > >/* > * end of chain and still didn't found parent, It's > very-very > * rare situation when root splited > */ >

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-05-05 Thread Teodor Sigaev
gistFindCorrectParent function have branch with following comment: /* * awful!!, we need search tree to find parent ... , but before we * should release all old parent */ Can you provide me an example of case when this branch works? See several lines above: if (parent->blkno == Inval

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-05-04 Thread Alexander Korotkov
During studying of existing GiST code I have a question. gistFindCorrectParent function have branch with following comment: /* * awful!!, we need search tree to find parent ... , but before we * should release all old parent */ Can you provide me an example of case when this branch works?

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-04-27 Thread Heikki Linnakangas
On 27.04.2011 09:51, Alexander Korotkov wrote: On Tue, Apr 26, 2011 at 1:10 PM, Alexander Korotkovwrote: Since algorithm is focused to reduce I/O, we should expect best acceleration in the case when index doesn't fitting to memory. Size of buffers is comparable to size of whole index. It means

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-04-26 Thread Alexander Korotkov
On Tue, Apr 26, 2011 at 1:10 PM, Alexander Korotkov wrote: > Since algorithm is focused to reduce I/O, we should expect best > acceleration in the case when index doesn't fitting to memory. Size of > buffers is comparable to size of whole index. It means that if we can hold > buffers in memory the

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-04-26 Thread Alexander Korotkov
On Tue, Apr 26, 2011 at 10:46 AM, Heikki Linnakangas < heikki.linnakan...@enterprisedb.com> wrote: > Just palloc() the buffers in memory, at least in the first phase. That'll > work fine for index creation. Dealing with concurrent searches and inserts > makes it a lot more complicated, it's better

Re: [HACKERS] GSoC 2011: Fast GiST index build

2011-04-25 Thread Heikki Linnakangas
Congrats on being selected, looking forward to mentor you! On 25.04.2011 23:09, Alexander Korotkov wrote: The first question that I would like to discuss is the node buffer storage. During index build each index page (except leaf) should have several pages of buffer. So my question is where to s

[HACKERS] GSoC 2011: Fast GiST index build

2011-04-25 Thread Alexander Korotkov
Hackers! I was happy to know that my proposal "Fast GiST index build" was accepted to GSoC 2011! Thank you very much for support! Especially thanks to Heikki Linnakangas for becoming my mentor! The first question that I would like to discuss is the node buffer storage. During index build each ind