| From: | "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: adding new pages bulky way |
| Date: | 2005-06-07 05:45:47 |
| Message-ID: | d83cef$u89$1@news.hub.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes
>
> I very seriously doubt that there would be *any* win, and I doubt even
> more that it could possibly be worth the klugery you'd have to do to
> make it happen. Bear in mind that index access methods are two API
> layers away from md.c --- how will you translate this into something
> that makes sense in the context of bufmgr's API?
>
Index access or heap access doesn't matter. The imaginary plan is like this:
-- change 1 --
/* md.c */
mdextend()
{
mdextend_several_pages();
add_pages_to_FSM();
}
-- change 2 --
/*
* Any places hold relation extension lock
*/
if (needLock)
LockPage(relation, 0, ExclusiveLock);
/* ADD: check again here */
if (InvalidBlockNumber != GetPageWithFreeSpace())
UnlockPage(relation, 0, ExclusiveLock);
/* I have to do the extension */
buffer = ReadBuffer(relation, P_NEW);
Above code is quite like how we handle xlogflush() currently.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Arshad Mahmood | 2005-06-07 06:14:07 | Building WIN32 DLL's |
| Previous Message | Tom Lane | 2005-06-07 05:28:54 | Re: adding new pages bulky way |