From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: ALTER COLUMN to change GENERATED ALWAYS AS expression?
Date: Tue, 07 Feb 2023 20:00:29 +0100
Message-ID: <9fe2f3c28d1b51cdec9393111ec97b8e8d3bb7c3.camel@cybertec.at> (raw)
In-Reply-To: <cd56aa1b-1797-57c4-aaea-5c58a27bcea7@gmail.com>
References: <4C775CB6-D73C-42B6-A94E-40C495AAA521@americanefficient.com>
<6442cf200b9ba3d86e695172c4da98a802bda48e.camel@cybertec.at>
<B728C50A-9EF1-4E13-82D8-B6CEAFC51B1F@americanefficient.com>
<60ebe24e-33c4-2f56-a3ea-fc85518ecc22@aklaver.com>
<cd56aa1b-1797-57c4-aaea-5c58a27bcea7@gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, ronljohnsonjr@gmail.com
Subject: Re: ALTER COLUMN to change GENERATED ALWAYS AS expression?
In-Reply-To: <9fe2f3c28d1b51cdec9393111ec97b8e8d3bb7c3.camel@cybertec.at>
References: <4C775CB6-D73C-42B6-A94E-40C495AAA521@americanefficient.com> <6442cf200b9ba3d86e695172c4da98a802bda48e.camel@cybertec.at> <B728C50A-9EF1-4E13-82D8-B6CEAFC51B1F@americanefficient.com> <60ebe24e-33c4-2f56-a3ea-fc85518ecc22@aklaver.com> <cd56aa1b-1797-57c4-aaea-5c58a27bcea7@gmail.com> <9fe2f3c28d1b51cdec9393111ec97b8e8d3bb7c3.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox