Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuwzM-00EpcA-Rd for pgsql-general@arkaria.postgresql.org; Wed, 19 Mar 2025 17:13:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tuwzK-008FVe-VR for pgsql-general@arkaria.postgresql.org; Wed, 19 Mar 2025 17:13:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuwzK-008FVW-Hb for pgsql-general@lists.postgresql.org; Wed, 19 Mar 2025 17:13:54 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tuwzG-003nXi-1t for pgsql-general@lists.postgresql.org; Wed, 19 Mar 2025 17:13:54 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.stl.internal (Postfix) with ESMTP id C5B7D2540172; Wed, 19 Mar 2025 13:13:49 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Wed, 19 Mar 2025 13:13:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1742404429; x=1742490829; bh=1 vA4WrU5Hu+6Cmw2GzcVqiMP73pcMBVAZStOSFS/w+8=; b=wP4OGeECQJ90ed6aB y2zu9/4qx7TmVdqSPA+amYuRtz1jJex5xheBZ9QFgdMP9C8P8DBEOk7RIks1C5xg JXBWDqYfRNWl1YBL53n2vaFsJ8bHELgHt7+30B/sd5ViqqtzXA582acCmwExf/7/ J2kEDWa3QapxOEK/BdWjmN8dwNmlpn7u5xg0PfFw52p6PjlAM38VT85WO1/IHOgz xQmhBZNAfbOsXvAT2LMhzqy0XtDHudMaaJBrrGWI1K9uP8a9YJoW8g7QakBAIvoY hx0WCw+x441v0m+O+JR3/OL4mm2aFDYj5vrYfbeVFMxqNi6BWGqKmkacAU1ggaT+ ZG/OQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeehledtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhf fvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpemllhhvrghrohcujfgvrhhr vghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrg htthgvrhhnpedvheeuffehgfeukeeufeehhefghfeugfefudekjeevudffgeffkeegffff veegheenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepthhoshhirhgrjhdrghesghhmrghilhdrtghomhdprhgtphht thhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdroh hrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Mar 2025 13:13:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1742404424; bh=FuDLKQH3/bIwBBZabMewU0igo3q51P4eM5VFENTi6cs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=jhUzBrra/tZbmD56x5opzZPdzFbpmgqV/F/QKpqq+NYMFaLWlW7KhzD1MOSVzclCA l9QBXU+IAGbg+VkKasWePrqTYy60gA5FAYvIZzQjZd/XBLFxM05DnmmkKAKHiNUg6d 2FUCqow8e2eWDqy8pcKN+SrjZ+RTHgBzTPI3gs9M6lBI9P5jfSn41oZAFPNE1jUGOs 42DWIgtpJLo+7xXBxbEqSL78aPvVBbggEdKVf9+HmkmW5rSss0tfHT2328yhO/lz+M a+CGmPWQxGon59UoTU4jADCPMwQoaN2tEpv6ZP3R0j8zDHNyCAkVN2bVWuCrIGsyRr xhCRyNpJtXvBg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id C968E87; Wed, 19 Mar 2025 18:13:44 +0100 (CET) Date: Wed, 19 Mar 2025 18:13:44 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Siraj G Cc: pgsql-general@lists.postgresql.org Subject: Re: size of attributes table is too big Message-ID: <202503191713.6pezw2uqo2c3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello On 2025-Mar-19, Siraj G wrote: > I have a PG (v16) instance which is occupying around 1TB of storage. Out of > this, around 350GB is occupied by the table pg_catalog.pg_attribute. > Why is the catalog table's size so big? Heavy use of temp tables is a known cause of this. > I think this table must have tons of dead tuples. Please suggest to me if > we can purge any data/shrink the size of this table. Yeah, I'd also bet that there are tons of dead tuples, or just unused free space. To purge it you would use VACUUM FULL, though that would need to lock all accesses to the table. Does your instance run with autovacuum disabled perchance? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ Bob [Floyd] used to say that he was planning to get a Ph.D. by the "green stamp method," namely by saving envelopes addressed to him as 'Dr. Floyd'. After collecting 500 such letters, he mused, a university somewhere in Arizona would probably grant him a degree. (Don Knuth)