Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPTDI-0003ew-PX for pgsql-general@arkaria.postgresql.org; Tue, 07 Feb 2023 19:01:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPTDH-0007dL-Iw for pgsql-general@arkaria.postgresql.org; Tue, 07 Feb 2023 19:01:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPTDH-0007dA-8I for pgsql-general@lists.postgresql.org; Tue, 07 Feb 2023 19:01:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPTDB-0004Vh-Uy for pgsql-general@lists.postgresql.org; Tue, 07 Feb 2023 19:01:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 317J0wxs3215094; Tue, 7 Feb 2023 14:00:58 -0500 From: Tom Lane To: Ron cc: pgsql-general@lists.postgresql.org Subject: Re: ALTER COLUMN to change GENERATED ALWAYS AS expression? In-reply-to: References: <4C775CB6-D73C-42B6-A94E-40C495AAA521@americanefficient.com> <6442cf200b9ba3d86e695172c4da98a802bda48e.camel@cybertec.at> <60ebe24e-33c4-2f56-a3ea-fc85518ecc22@aklaver.com> Comments: In-reply-to Ron message dated "Tue, 07 Feb 2023 12:40:13 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3215092.1675796458.1@sss.pgh.pa.us> Date: Tue, 07 Feb 2023 14:00:58 -0500 Message-ID: <3215093.1675796458@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > On 2/7/23 09:06, Adrian Klaver wrote: >> 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 moves all the tuples into a new file, but it does not rebuild individual tuples, as would be needed to delete column values. regards, tom lane