From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Jay Levitt <jay(dot)levitt(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Bugs/slowness inserting and indexing cubes |
Date: | 2012-02-14 22:09:24 |
Message-ID: | CAPpHfduSW5QZGWOE+-Zoe_rQTBTM28xtD3eu9KOyKEuCqWr70Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
ITSM, I found the problem. This piece of code is triggering an error. It
assumes each page of corresponding to have initialized buffer. That should
be true because we're inserting index tuples from up to down while
splits propagate from down to up.
if (!found)
{
/*
* Node buffer should exist at this point. If it didn't exist before,
* the insertion that caused the page to split should've created it.
*/
elog(ERROR, "node buffer of page being split (%u) does not exist",
blocknum);
}
But this assumptions becomes false we turn buffer off in the root page. So,
root page can produce pages without initialized buffers when splits.
/*
* Does specified level have buffers? (Beware of multiple evaluation of
* arguments.)
*/
#define LEVEL_HAS_BUFFERS(nlevel, gfbb) \
((nlevel) != 0 && (nlevel) % (gfbb)->levelStep == 0 && \
(nlevel) != (gfbb)->rootitem->level)
So, I think we should just do silent return from the function instead of
triggering error. Patch is attached.
------
With best regards,
Alexander Korotkov.
Attachment | Content-Type | Size |
---|---|---|
gist_build_fix.patch | text/x-patch | 704 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-02-14 22:39:58 | Re: When do we lose column names? |
Previous Message | Bruce Momjian | 2012-02-14 21:52:33 | Re: random_page_cost vs seq_page_cost |