| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-docs(at)postgreSQL(dot)org |
| Subject: | Error in ALTER TABLE documentation |
| Date: | 2015-08-14 14:32:41 |
| Message-ID: | 4198.1439562761@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Marc Mamin | 2015-08-25 13:29:43 | unclear description for the Pattern Modifiers in formatting functions |
| Previous Message | Tom Lane | 2015-08-14 14:23:10 | Re: [BUGS] Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot |