public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: [email protected]
Subject: Error in ALTER TABLE documentation
Date: Fri, 14 Aug 2015 10:32:41 -0400
Message-ID: <[email protected]> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-docs>
The Notes section of the ALTER TABLE reference page explains that ALTER
DROP COLUMN doesn't immediately reclaim any space, and then says:
To force an immediate rewrite of the table, you can use VACUUM FULL,
CLUSTER or one of the forms of ALTER TABLE that forces a rewrite. This
results in no semantically-visible change in the table, but gets rid
of no-longer-useful data.
Isn't this wrong in context? That is, yes the rewriting forms of ALTER
TABLE would reclaim dead-column space, because they reconstruct every
tuple. But VACUUM FULL and CLUSTER do not reconstruct tuples AFAIR,
so they wouldn't do a thing to reclaim space from a dropped column.
I think this reference to those two commands should be removed, and maybe
tighten the description of what's being recommended, say like so:
To force immediate reclamation of space occupied by a dropped column,
you can execute one of the forms of ALTER TABLE that performs a rewrite
of the whole table. This results in reconstructing each row with the
dropped column replaced by a null value.
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
reply
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: [email protected]
Cc: [email protected]
Subject: Re: Error in ALTER TABLE documentation
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox