From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | BTree freelist handling |
Date: | 2002-12-18 07:50:07 |
Message-ID: | 20021218075007.GA3225@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Hackers,
I'm very sorry to report that I couldn't finish the btree free page
handling patch. I leave tomorrow and will be back on March next year,
so probably it's better for someone else to take what I have done to
test, review or discard entirely. If nothing happens, I'll take it
again when I'm back and hopefully have it ready for 7.4. However this
is a dangerous patch (deadlocks, maybe index corruption, even WAL log
corruption in some cases) and is probably better to integrate it early
so it gets lots of testing --- a working version, that is.
What does this patch do: it marks empty pages as BTP_DEAD during
btbulkdelete, and those pages are later marked BTP_FREE and added to the
freelist. How the freelist is handled is explained in the initial
comment in nbtfreelist.c. This works reasonably well, though I didn't
try INSERTing concurrently with VACUUM (this is important).
What is missing: support from _bt_endpoint() is the most obvious thing.
In practice this means that one can't run VACUUM a second time in
general :-(. Probably _bt_search() is broken too.
I probably will be reading email from time to time, so if anything comes
up or there's something for me to clarify please reply to this or take
it to -hackers with CC to me.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Vivir y dejar de vivir son soluciones imaginarias.
La existencia está en otra parte" (Andre Breton)
Attachment | Content-Type | Size |
---|---|---|
btree-freelist.patch | text/plain | 20.8 KB |
nbtfreelist.c | text/plain | 14.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2002-12-18 12:29:16 | max_fsm_pages increased to 1000 by default |
Previous Message | Bruce Momjian | 2002-12-18 04:17:07 | Re: MVCC doc improvements |