Re: ALTER TABLE DROP COLUMN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TABLE DROP COLUMN
Дата
Msg-id 7276.971127830@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE DROP COLUMN  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
The Hermit Hacker <scrappy@hub.org> writes:
>> It is not.  The only downside is 2x disk space to make new versions of
>> the tuple.

> huh?  vacuum moves/cleans up tuples, as well as compresses them, so that
> the end result is a smaller table then what it started with, at/with very
> little increase in the total size/space needed to perform the vacuum ...

Huh? right back at you ;-).  Vacuum is very careful to make sure that
it always has two copies of any tuple it moves.  The reason it's not 2x
disk space is that it only moves tuples to fill free space in existing
pages of the file.  So the moved tuples take up space-that-was-free as
well as the space they were originally in.  But this has nothing
whatever to do with the requirements of ALTER DROP COLUMN --- to be
safe, that must have two copies of every tuple, free space or no free
space.
        regards, tom lane


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: ALTER TABLE DROP COLUMN
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER TABLE DROP COLUMN