Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQG2e-0006H9-Hh for pgsql-docs@arkaria.postgresql.org; Fri, 14 Aug 2015 14:33:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZQG2e-0004Z8-3y for pgsql-docs@arkaria.postgresql.org; Fri, 14 Aug 2015 14:33:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZQG2I-0003mV-92 for pgsql-docs@postgreSQL.org; Fri, 14 Aug 2015 14:32:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZQG2F-0000xK-L8 for pgsql-docs@postgreSQL.org; Fri, 14 Aug 2015 14:32:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t7EEWfHt004199 for ; Fri, 14 Aug 2015 10:32:41 -0400 From: Tom Lane To: pgsql-docs@postgreSQL.org Subject: Error in ALTER TABLE documentation Date: Fri, 14 Aug 2015 10:32:41 -0400 Message-ID: <4198.1439562761@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org The Notes section of the ALTER TABLE reference page explains that ALTER DROP COLUMN doesn't immediately reclaim any space, and then says: To force an immediate rewrite of the table, you can use VACUUM FULL, CLUSTER or one of the forms of ALTER TABLE that forces a rewrite. This results in no semantically-visible change in the table, but gets rid of no-longer-useful data. Isn't this wrong in context? That is, yes the rewriting forms of ALTER TABLE would reclaim dead-column space, because they reconstruct every tuple. But VACUUM FULL and CLUSTER do not reconstruct tuples AFAIR, so they wouldn't do a thing to reclaim space from a dropped column. I think this reference to those two commands should be removed, and maybe tighten the description of what's being recommended, say like so: 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. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs