Re: Determine potential change in table size after a column dropped?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Determine potential change in table size after a column dropped?
Дата
Msg-id 84b61f419a0a5ba1049c7d74a85b6790bfe9e1e9.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Determine potential change in table size after a column dropped?  (Wells Oliver <wells.oliver@gmail.com>)
Ответы Re: Determine potential change in table size after a column dropped?  (Thomas Kellerer <shammat@gmx.net>)
Re: Determine potential change in table size after a column dropped?  (Wells Oliver <wells.oliver@gmail.com>)
Список pgsql-admin
On Sat, 2022-01-22 at 09:08 -0800, Wells Oliver wrote:
> I need only drop the column and VACUUM FULL the table, and not the entire DB, right?

Not that VACUUM (FULL) will *not* physically get rid of a dropped column,
as it just copies the complete rows to a new table.

You would need something like:

CREATE TABLE newtab (LIKE oldtab);
INSERT INTO newtab SELECT * FROM oldtab;

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Determine potential change in table size after a column dropped?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Determine potential change in table size after a column dropped?