From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: ALTER COLUMN to change GENERATED ALWAYS AS expression? |
Date: | 2023-02-07 19:00:29 |
Message-ID: | 9fe2f3c28d1b51cdec9393111ec97b8e8d3bb7c3.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2023-02-07 at 12:40 -0600, Ron wrote:
> > "The DROP COLUMN form does not physically remove the column, but simply makes it
> > invisible to SQL operations. Subsequent insert and update operations in the table
> > will store a null value for the column. Thus, dropping a column is quick but it
> > will not immediately reduce the on-disk size of your table, as the space occupied
> > by the dropped column is not reclaimed. The space will be reclaimed over time as
> > existing rows are updated.
> >
> > 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."
>
> VACUUM FULL doesn't rewrite the table?
It rewrites the table, but it just copies rows rather than reconstructing them.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-02-07 19:00:58 | Re: ALTER COLUMN to change GENERATED ALWAYS AS expression? |
Previous Message | Ron | 2023-02-07 18:40:13 | Re: ALTER COLUMN to change GENERATED ALWAYS AS expression? |