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 1kFaFf-0003TF-WC for pgsql-admin@arkaria.postgresql.org; Tue, 08 Sep 2020 09:49:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFaFe-0003JU-Kn for pgsql-admin@arkaria.postgresql.org; Tue, 08 Sep 2020 09:49:22 +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 1kFaFe-0003Hc-9e for pgsql-admin@lists.postgresql.org; Tue, 08 Sep 2020 09:49:22 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFaFa-0005Pf-O9 for pgsql-admin@postgresql.org; Tue, 08 Sep 2020 09:49:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HLWUCvrJ8DcScs2gBNjqxTvm5Loe1pOEBaGxSesJ1ew=; b=qRhgSZguX9Je/OrZd166zZJkSV Ra2aPkh1e/JE1UJgdkpIXS/E8bQUABq9DIaIP/4fimNKO3kCVEUCOm191r3eFIeLdrUksKzboOdsM Omol5xNide4VVWOEujbxDNOkvd+h3xH6oc33B5LpjeGSNK4zFGnviMl0+zDgdogQRQBg=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1kFaFZ-00040t-IU; Tue, 08 Sep 2020 11:49:17 +0200 Date: Tue, 8 Sep 2020 11:49:17 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: ZongtianHou Cc: pgsql-admin Subject: Re: how to clean dropped column in pg_attribute Message-ID: <20200908094917.GA11563@depesz.com> Reply-To: depesz@depesz.com References: <86FE93ED-B4E9-4907-8E5C-FB8A566115E7@icloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <86FE93ED-B4E9-4907-8E5C-FB8A566115E7@icloud.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Sep 08, 2020 at 05:38:24PM +0800, ZongtianHou wrote: > I found dropped columns still exist in pg_attribute table. In the > below example I drop c2 column and vacuum (full) this table and > pg_attribute, it still exist (the last row). how can I clean it away? Unfortunately only by copying the table aside, and then renaming new table. But - the dropped attribute will not sure any disk space, as long as you ran some vacuums. Best regards, depesz