From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: pre-upgrade page reservation |
Date: | 2008-12-17 10:33:11 |
Message-ID: | 4948D567.4060908@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Zdenek Kotala wrote:
> Heikki Linnakangas napsal(a):
>> Zdenek Kotala wrote:
>>> BTree space reservation is more complicated.
>>
>> Do you need to pre-reserve the space for b-tree? I think you can just
>> split it at upgrade, in the new version. The problem with doing that
>> for heaps is that to move a heap tuple you need to update the index
>> pointers, but for indexes there's no such restriction.
>
> The problem is that I need to know parent and modify parent as well. But
> you don't know what is your parent node. You need to know root and go
> from root.
> It is why I think that it is not doable online.
Oh, you're planning to walk the B-tree in index order, not physical
order, so that you always have the stack for inserting the parents? You
don't necessarily need the stack, if you're not worried about
performance. _bt_insert_parent will scan the next level up to find the
parent in that case. That's slow, but so is walking the B-tree, and I'd
expect it to be rare that you need to split b-tree pages at upgrade anyway.
(I still think you're distracted, BTW. There's zero evidence that we'll
need any of this for the 8.4->8.5 upgrade. And if we do, we don't know
for sure that this will solve the problem, whatever the problem is.)
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2008-12-17 11:50:03 | Re: Sync Rep: First Thoughts on Code |
Previous Message | Zdenek Kotala | 2008-12-17 10:19:13 | Re: WIP: pre-upgrade page reservation |