From: Scott Carey <scott@richrelevance.com>
To: postgres performance list <pgsql-performance@postgresql.org>
Subject: ALTER Table and CLUSTER does adding a new column rewrite clustered? (8.4.3)
Date: Tue, 22 Jun 2010 10:30:35 -0700
Message-ID: <37F2FA33-49B6-478D-BCFE-FD0DBC4CBBA8@richrelevance.com> (raw)
v. 8.4.3
I have a table that has several indexes, one of which the table is clustered on. If I do an ALTER TABLE Foo ADD COLUMN bar integer not null default -1;
It re-writes the whole table.
* Does it adhere to the CLUSTER property of the table and write the new version clustered?
* Does it properly write it with the FILLFACTOR setting?
* Are all the indexes re-created too, or are they bloated and need a REINDEX?
http://www.postgresql.org/docs/8.4/static/sql-altertable.html
does not seem to answer the above, it mentions the conditions that cause a rewrite but does not say what the state is after the rewrite with respect to CLUSTER, FILLFACTOR, and index bloat.
Thanks in advance!
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-performance@postgresql.org
Cc: scott@richrelevance.com
Subject: Re: ALTER Table and CLUSTER does adding a new column rewrite clustered? (8.4.3)
In-Reply-To: <37F2FA33-49B6-478D-BCFE-FD0DBC4CBBA8@richrelevance.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