Re: ALTER TABLE DROP COLUMN

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: ALTER TABLE DROP COLUMN
Дата
Msg-id 200010092116.RAA16232@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE DROP COLUMN  (The Hermit Hacker <scrappy@hub.org>)
Ответы Re: ALTER TABLE DROP COLUMN  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
> > > Sorry, that's what I meant ... why should marking a column as 'deleted'
> > > and running a 'vacuum' to clean up the physical table be any less
> > > crash-safe?  
> > 
> > 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 ...
> 
> if we reduced vacuum such that it compressed at the field level vs tuple,
> we could move a few tuples to the end of the table (crash safe) and then
> move N+1 to position 1 minus that extra field.  If we mark the column as
> being deleted, then if the system crashes part way through, it should be
> possible to continue after the system is brought up, no?

If it crashes in the middle, some rows have the column removed, and some
do not.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

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