From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Jaime Casanova <systemguards@gmail.com>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: Maintaining cluster order on insert
Date: Mon, 21 May 2007 10:48:59 +0100
Message-ID: <46516B0B.3000907@enterprisedb.com> (raw)
In-Reply-To: <2e78013d0705210232m5d031a6fk779be6d7df5a2e3c@mail.gmail.com>
References: <200705152223.l4FMNJa17969@momjian.us>
<464A33AB.1050401@enterprisedb.com>
<20070516003810.GI20707@nasby.net>
<464B15EF.4000808@enterprisedb.com>
<c2d9e70e0705172153g3207adb6kd4abdfdf3a9215ff@mail.gmail.com>
<464D96D6.1030608@enterprisedb.com>
<c2d9e70e0705182205o44a4bbbft18a73b9de91de726@mail.gmail.com>
<464F410C.8090900@enterprisedb.com>
<2e78013d0705210117y6a65245cw426bbaafa9eb6419@mail.gmail.com>
<2e78013d0705210232m5d031a6fk779be6d7df5a2e3c@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: heikki@enterprisedb.com, pavan.deolasee@gmail.com, systemguards@gmail.com, pgsql-patches@postgresql.org
Subject: Re: Maintaining cluster order on insert
In-Reply-To: <46516B0B.3000907@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox