Error in ALTER TABLE documentation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Error in ALTER TABLE documentation
Дата
Msg-id 4198.1439562761@sss.pgh.pa.us
обсуждение исходный текст
Список 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


В списке pgsql-docs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot
Следующее
От: Marc Mamin
Дата:
Сообщение: unclear description for the Pattern Modifiers in formatting functions