Re: CLUSTER, VACUUM, and TABLESPACEs (oh my) - Mailing list pgsql-general

From Guillaume Lelarge
Subject Re: CLUSTER, VACUUM, and TABLESPACEs (oh my)
Date
Msg-id CAECtzeWkVj_FCZ8ppPJvL4jUdJZ6p16uor2BRJdFpt-nPWkD6w@mail.gmail.com
Whole thread Raw
In response to Re: CLUSTER, VACUUM, and TABLESPACEs (oh my)  (Demitri Muna <postgresql@demitri.com>)
List pgsql-general
Le lun. 25 janv. 2021 à 03:27, Demitri Muna <postgresql@demitri.com> a écrit :

> On Jan 24, 2021, at 9:03 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
>
>> VACUUM FULL unclusters the table??
>
> It will rebuild the table without sorting the data according to the index used with CLUSTER (without any sorting actually).

Thank you for the clarification; that’s very helpful. For the case above. If I CLUSTER a table, add/delete no rows, then VACUUM, will the existing order remain or be changed?

As long as you don't insert or update any rows, the order should remain even after a VACUUM FULL.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can I use Postgres rules to reset session variables before/after queries?
Next
From: "James B. Byrne"
Date:
Subject: Need another set of eyes on this