Re: Clustered table order is not preserved on insert - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: Clustered table order is not preserved on insert
Date
Msg-id 20060427001523.GR97354@pervasive.com
Whole thread Raw
In response to Re: Clustered table order is not preserved on insert  ("Andrus" <eetasoft@online.ee>)
List pgsql-general
On Wed, Apr 26, 2006 at 11:05:09PM +0300, Andrus wrote:
> >> I want to duplicate report so that id order is preserved.
> >
> > Tables aren't ordered by definition.
>
> From CLUSTER docs:
>
> "When a table is clustered, it is physically reordered based on the index
> information. "

Keep reading... from the same paragraph:

Clustering is a one-time operation: when the table is subsequently
updated, the changes are not clustered. That is, no attempt is made to
store new or updated rows according to their index order. If one wishes,
one can periodically recluster by issuing the command again.

There is absolutely no way to enforce any kind of table ordering in
PostgreSQL as soon as you do *anything* that changes the table.

And like others said, I think you need to re-think how you're doing
this... :)
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Database Selection
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Moving a data base between differnt OS