Re: Determine potential change in table size after a column dropped?
| От | Wells Oliver |
|---|---|
| Тема | Re: Determine potential change in table size after a column dropped? |
| Дата | |
| Msg-id | CAOC+FBWhRvt9TORHxG1K1AA_MCE+0Y=j7wUzuD6wQShEzDCbdA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Determine potential change in table size after a column dropped? (Laurenz Albe <laurenz.albe@cybertec.at>) |
| Ответы |
Re: Determine potential change in table size after a column dropped?
|
| Список | pgsql-admin |
So, there's really no way to reclaim space from a dropped column other than entirely creating a new table?
On Mon, Jan 24, 2022 at 12:28 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
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
Wells Oliver
wells.oliver@gmail.com
wells.oliver@gmail.com
В списке pgsql-admin по дате отправления: