Re: Fix for seg picksplit function
От | Alexander Korotkov |
---|---|
Тема | Re: Fix for seg picksplit function |
Дата | |
Msg-id | AANLkTikjM74_HsTuFSRoW8V5m-v+iFdOA+=66f1Uukep@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Fix for seg picksplit function (Yeb Havinga <yebhavinga@gmail.com>) |
Список | pgsql-hackers |
On Wed, Nov 10, 2010 at 6:05 PM, Yeb Havinga <yebhavinga@gmail.com> wrote:
You're right, they are not related. I'm no longer sure it is necessary, looking at gistUserPicksplit.On 2010-11-10 15:46, Alexander Korotkov wrote:On Wed, Nov 10, 2010 at 5:37 PM, Yeb Havinga <yebhavinga@gmail.com> wrote:They are necessary and it is code untouched by this patch, and the same line occurs in other picksplit functions as well. The gbt_num_picksplit function shows that it can be avoided, by rewriting in the second loop
*left++ = sortItems[i].index;
into
v->spl_left[v->spl_nleft] = sortItems[i].index
Even though this is longer code, I prefer this variant over the shorter one.I can't understand this point. How the way of spl_left and spl_right arrays filling is related with additional FirstOffsetNumber value at the end of array, which is added by "*left = *right = FirstOffsetNumber;" line?
Teodor, Oleg, probably, you can help us. Is "*left = *right = FirstOffsetNumber;" line necessary in picksplit function or doing something useful?
With best regards,
Alexander Korotkov.
В списке pgsql-hackers по дате отправления: