From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Herve Piedvache" <herve(at)elma(dot)fr>, "Jean-Christophe Boggio" <cat(at)thefreecat(dot)org>, "Sebastien COUREAU" <lifo(at)elma(dot)fr> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Pb importing data in v. 7.0.3 |
Date: | 2001-01-04 04:25:26 |
Message-ID: | 19927.978582326@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
> "Herve Piedvache" <herve(at)elma(dot)fr> writes:
>> When doing a "psql -e mydatabase < db", an error occured when recreating
>> indexes.
>> The error is :
>> -------------------------
>> FATAL 1: btree: failed to add item to the page in _bt_sort (2)
After digging around in the failed process, I now understand what's
happening. This error occurs when index building needs to insert a
new index item on a disk page, and finds that there isn't enough space
to insert the item, so it splits the page ... but then there *still*
isn't enough space on the right-hand split page for the new index
item. This can happen in pathological cases, because the choice of
split point is constrained by 7.0's handling of chains of equal keys;
it doesn't want to split in the middle of a chain. In the example
at hand, it seems that the pre-split page contained a single key
of a lower value (call it 'A') and all the remaining keys were of the
same higher value (call it 'AAAA'). We split the page in such a way
that the left sub-page has the 'A' and the right page has all the
'AAAA's ... which leaves us enough room on the right page to insert
an 'A', but unfortunately what we want to insert is 'AAAA' and it
doesn't fit.
The equal-key logic has been entirely rewritten for 7.1, and I believe
that it's not subject to this bug any longer. I'm very hesitant to try
to jury-rig a solution for 7.0, though, because the old equal-key
handling is so complex and fragile that some other, more common case
might break. How do you feel about running 7.1 beta?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Anthony E . Greene | 2001-01-04 04:41:19 | Re: Problems about extracting data with cgi's |
Previous Message | Tom Lane | 2001-01-04 03:01:17 | Re: 7.1 PL/pgSQL EXECUTE Command |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-01-04 04:43:57 | Re: Pb importing data in v. 7.0.3 |
Previous Message | Tom Lane | 2001-01-03 16:52:13 | Re: Pb importing data in v. 7.0.3 |