Re: Maintaining cluster order on insert

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Maintaining cluster order on insert
Дата
Msg-id 46516B0B.3000907@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Maintaining cluster order on insert  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Ответы Re: Maintaining cluster order on insert  ("Jim C. Nasby" <decibel@decibel.org>)
Список pgsql-patches
Pavan Deolasee wrote:
> On 5/21/07, Pavan Deolasee <pavan.deolasee@gmail.com> wrote:
>>
>>
>>
>> On 5/19/07, Heikki Linnakangas <heikki@enterprisedb.com > wrote:
>> >
>> >
>> > Ah, sorry about that. For some reason my source tree was checked out
>> > from the 8.2 branch, instead of CVS HEAD.
>> >
>> >
>> I looked at the patch. Not that I am very comfortable with this part
>> of the code, but nevertheless here are my comments:
>>
>>
> Another problem that I noticed with the patch is that it disregards
> the fillfactor while inserting the tuples. ISTM that this is a correct
> behavior when a tuple is being inserted in the block to preserve cluster
> ordering. But when the tuple is being inserted as a normal operation,
> IMO we should respect the fillfactor.
>
> The easiest way to reproduce this is to insert tuples sorted on the
> cluster index key.

Actually it does respect the fillfactor when the block suggested by
indexam is full. When you insert tuples sorted on the cluster index key,
the suggested page after the first tuple on the new page is always the
last page. Try inserting in random order instead.

IOW it's working as designed. But maybe it's not the desired behavior.
Should we have a special case and always respect the fillfactor when
inserting to the last page of the heap?

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

В списке pgsql-patches по дате отправления:

Предыдущее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: Maintaining cluster order on insert
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Concurrent psql patch