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 1s1Rqa-00CNnk-JR for pgsql-general@arkaria.postgresql.org; Mon, 29 Apr 2024 14:19:13 +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 1s1RqX-00HP1c-4T for pgsql-general@arkaria.postgresql.org; Mon, 29 Apr 2024 14:19:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s1RqV-00HP1T-FM for pgsql-general@lists.postgresql.org; Mon, 29 Apr 2024 14:19:09 +0000 Received: from wfhigh7-smtp.messagingengine.com ([64.147.123.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s1RqS-000cAa-Pv for pgsql-general@lists.postgresql.org; Mon, 29 Apr 2024 14:19:07 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.west.internal (Postfix) with ESMTP id A1E0C180016D; Mon, 29 Apr 2024 10:19:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 29 Apr 2024 10:19:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1714400342; x=1714486742; bh=LNsrk5NKPlPIjF+bRWbfXaHW2kkzr4dDxPPhKce/8vg=; b= NNULoOS4P1fbRtqK5RzydCfFz59H8+x1uOGuz2AB9hNCcRCoJe8Slku4v0mpEVlS uIRZHZKe+OZPrgucDum5VgatYPnrsFuRj+3Ab3T8W27Zh/Bv1eUliog+FU6iqyeB or+BvlI+UBlpr2aN6iXXT6d6v9XQsou3HWRpo/wVCFjz7JfBHapkWpvXs4G8Zw8B Pu7RzmAPTNNK5AkQpPa7lcIv6S8k0Uw0FbwVGdoQp1VdRT+s0afIrcN9I9EPot67 r15nvNQH+X1OvJlV1l1AQr6w7HRboaUMm4yo+DhtDzEHZxv8llY6Bn/p/+hp78oA nnzNA0/iKg4T5d+XEXRhWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714400342; x= 1714486742; bh=LNsrk5NKPlPIjF+bRWbfXaHW2kkzr4dDxPPhKce/8vg=; b=Y 4HlX35XPjYA86wzh4zZzYWuZPcfMd2/C6N7dC5WQJbNMGw+CmhOkSY+OwpUPnbkE DjZohtqgfgAYmYE2LTQKFlLRLNKJobi42I3vS+kQk23QpFZ7PtijJkgvc+X21h0y cRd4lCfUav7Bfn3Kv2POdSRzOkDwBx5HaklRttsYt2WyCSW662/bq2VkC/HRml9c dr+7Qs9Oyi6/8HZF29e6aowrSFgZR4W3Vk/wQbA6cLEGgais8QZKCdup2wmW/q5p d/9S7Hxz9gxmWoSev3+GnvJsiSZwOcfXFTdIbQf34Rmy+d/pjmG+rJrg8Ic1kod+ LQ1LsRyLRzsiS6KMWZkCQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdduuddgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeekfeehuddvjeeigfeifeejtdduudffledvfeelheef tdeiffeugfdvkeelgedtvdenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Apr 2024 10:19:01 -0400 (EDT) Message-ID: <5874a355-51fb-4fa3-acf4-df81a6d5b5f0@aklaver.com> Date: Mon, 29 Apr 2024 07:19:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Need help to make space on my database To: Cocam' server , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/29/24 06:45, Cocam' server wrote: > Hello. > > I need help to make space on my database. I have tables that are several > GB in size. I used to use the VACUUM FULL VERBOSE command; but now, this > command is too greedy in free space to be used and I'm looking for a way > to make free space (given back to the OS) > > Thanks in advance to everyone who responds Per https://www.postgresql.org/docs/current/sql-vacuum.html "VACUUM reclaims storage occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done. Therefore it's necessary to do VACUUM periodically, especially on frequently-updated tables. <...> Plain VACUUM (without FULL) simply reclaims space and makes it available for re-use. This form of the command can operate in parallel with normal reading and writing of the table, as an exclusive lock is not obtained. However, extra space is not returned to the operating system (in most cases); it's just kept available for re-use within the same table. " So a regular VACUUM should work if all you want to do is give the database the ability to recycle the vacuumed tuple space. -- Adrian Klaver adrian.klaver@aklaver.com