From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
Subject: | Re: GiST insert algorithm rewrite |
Date: | 2010-12-21 18:00:26 |
Message-ID: | 4D10EB3A.1080207@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 16.12.2010 15:52, Heikki Linnakangas wrote:
> On 13.12.2010 20:30, Tom Lane wrote:
>> Can we fix it so that each child page is updated, and its downlink
>> inserted, as a separate atomic action? That'd require each intermediate
>> state to be consistent and crash-safe, but I think you really need the
>> intermediate states to be consistent anyway because of concurrent scans.
>
> Here's an updated patch, using that idea.If a page split into more than
> two pages, the downlinks for the pages are inserted to the parent
> one-by-one, right-to-left, until there's only two remaining. Finally the
> downlink for the last remaining right page is inserted and the downlink
> for the original page is updated as one atomic operation.
>
> It was a pretty big rewrite again, but seems to work now. I tested
> splits that span more than two pages by rigging the btree_gist picksplit
> function to choose very bad split points, and the fix-split logic by
> adding elog(ERROR) in strategic places to sometimes leave splits
> incomplete.
One final version, with a bug fix wrt. root page split and some cleanup.
I'm planning to commit this before Christmas. It's a big patch, so
review would be much appreciated.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
gist-insert-rewrite-6.patch | text/x-diff | 116.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2010-12-21 18:03:38 | Re: proposal : cross-column stats |
Previous Message | Kevin Grittner | 2010-12-21 17:32:03 | Re: optimization histograms |