Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0Swo-00059r-Fw for pgsql-admin@arkaria.postgresql.org; Mon, 26 Mar 2018 14:18:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0Swm-0004xv-Ol for pgsql-admin@arkaria.postgresql.org; Mon, 26 Mar 2018 14:18:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0Swm-0004xi-B9 for pgsql-admin@lists.postgresql.org; Mon, 26 Mar 2018 14:18:04 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f0Swj-0008N4-2O for pgsql-admin@postgresql.org; Mon, 26 Mar 2018 14:18:03 +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; bh=2y6Vboa9CppvxrgiQ0agEsrdpV+kF1lDy/cPKsdwRuo=; b=dDyVCLUQ3m7sg2YqatEyeiLmT3hIMqDgacUm0x9+zeFRbRJ7pYtjNqJxNRldTlbkY6gIqOQ5FlEuFGefkO6tjxgGU89BUMWdiVy8T81GRxrIt/4k0le6My9/ddhHB0RkmPk/y3CqZHT0LuDqvzJ0gKrua8L3UBNuojDzKxL3h1Y=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.84_2) (envelope-from ) id 1f0Swf-0005IA-10; Mon, 26 Mar 2018 16:17:57 +0200 Date: Mon, 26 Mar 2018 16:17:56 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Artem Tomyuk Cc: Keith , pgsql-admin Subject: Re: how to shrink pg_attribute table in some database Message-ID: <20180326141756.GB708@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Mar 26, 2018 at 05:15:14PM +0300, Artem Tomyuk wrote: > For now pg_attribute bloated to 300GB in size, and we have only 260GB's of > free space on disk. > In normal situation pg_attribute takes 50mb in size for our DB... > Can we assume that if we will run vacuum full on pg_attribute it will take > additional 50MB on disk? You can estimate by doing: create table z as select * from pg_Attribute; and then checking size of z. bloat there suggests that you have huge churn in tables - like: create table, drop table, lots of times. Best regards, depesz