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 1sTWYL-00HAen-QR for pgsql-admin@arkaria.postgresql.org; Tue, 16 Jul 2024 01:00:26 +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 1sTWYJ-00EMGW-IK for pgsql-admin@arkaria.postgresql.org; Tue, 16 Jul 2024 01:00:23 +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 1sTWYJ-00EMGO-1d for pgsql-admin@lists.postgresql.org; Tue, 16 Jul 2024 01:00:23 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sTWYC-002KBu-6o for pgsql-admin@lists.postgresql.org; Tue, 16 Jul 2024 01:00:22 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a77c9c5d68bso582581866b.2 for ; Mon, 15 Jul 2024 18:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1721091615; x=1721696415; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:to:from:subject:message-id:from:to:cc :subject:date:message-id:reply-to; bh=COVUE3gOfEOcW0tKc7YxghdS3+4ENy+vnTNyZLpGr0M=; b=aNEZTv3Rn+/P0I/6RQd1jgvClxToZ8W0IWCWxgO5BzVYGY7mdgrD0HjQPCwQt+YkKK ShJ1Bd9P5HSJV6EeUaUio5f7TVZMBXmat+RgyyaZgyxlT0Nxf6QpEuHBOG8keaghqPV3 03v9prFJ1cpVjTySIthTbKQkSosZjsk86AI3txPQdsT6mIPLB3hBkoKx4jOgx2JQQMvL TXe56MvHkOzCU32Z1LABNHyBkARhd4p3SGzLRUumwAwrkG70WuR3CZxma9+4WGKu6piv AEQTceiNUP2S3ANTlZ/TQsyprLXPJMzAenMu1pJUgvb/I9L6Yw3+7sRxG+zKyT5Hoj0K gc6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721091615; x=1721696415; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=COVUE3gOfEOcW0tKc7YxghdS3+4ENy+vnTNyZLpGr0M=; b=uDw1jwUneX/KlwdjTHA1z7P5HynG96MmgPWulMLoJiPrWDgIdUFzBoudgc2iwg6I0h M9yk0UfrB1r8KwTZflRYe33d4kDsgvJIxXQ6SePfJnLanY5WTAS91aIe4saFFhFjLczy QLw+xxHzaGDj+e2bWMu/m45XYfu41HJJhn8oEovxlBq7d5DHtcxnKjgXVqBSTzMJUYnP 7hFzGdQ1jzvL+Rjf9Ux7iB8wWcY32T9Vn7/T+6pM0rpjEGGg36gY9zgodD8UzfXa2zlb bQoceC1SfU/gCyi0HgubsnrxcFTx32Nr3yFSMz+zrBo8ruarAYg0qwH61uV6JtM3Ol97 K0rA== X-Forwarded-Encrypted: i=1; AJvYcCX2HESMIgPSEXQr5tdfIfuRXUQn2yB8pZcYwjbqSGYOC+cD01mv5Pw4BPYBun6M/PqTBJcsCtnDMLYEDkvkJjyHM/nMjT3KvgGZxNKF2o0EfQ== X-Gm-Message-State: AOJu0YwL+8UEIXoaVCCuhidInY1HUr4txiUEcYmxa9uin2xY4ZjQV234 oyh1baJUMj7JL7k73DWMApLm/V5WkCL6ituLaiWPQkw5t4pryAdGG2p2f9QKTaKAaLlUV3h1f9Z g X-Google-Smtp-Source: AGHT+IFXb3/HgXgLkAgrFG92M+p7E+v9eXf6ENP0uQETg/q4IHDhOXkC7ssNzdyHm7YyaGxoiuy4ZA== X-Received: by 2002:a17:906:f92:b0:a77:c5a5:f662 with SMTP id a640c23a62f3a-a79ea3d797emr41675466b.12.1721091614630; Mon, 15 Jul 2024 18:00:14 -0700 (PDT) Received: from localhost.localdomain (91-115-8-77.adsl.highway.telekom.at. [91.115.8.77]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5b73ddsm251195166b.58.2024.07.15.18.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 18:00:14 -0700 (PDT) Message-ID: Subject: Re: filesystem full during vacuum - space recovery issues From: Laurenz Albe To: Thomas Simpson , pgsql-admin@lists.postgresql.org Date: Tue, 16 Jul 2024 02:58:43 +0200 In-Reply-To: References: Autocrypt: addr=laurenz.albe@cybertec.at; prefer-encrypt=mutual; keydata=mQINBGGDwAQBEADgbWy5cKXQld3N2mF+DFyiNFbi2oBl2T+XgxpPF8wTRw2D/u4bBKXP0SYSE/lA86jIVNWWU0gf1KODIkVvgJm2w4vH2VBV1b7ddVViGl1Iu+9zaRnv9wulhnH42KefepXnoean6UT1EzLM0opF/Ik0j+40TxdRtobkBprkQUyHDXWlHc2ffPs3SipyFEP9AVLf7ejRC46CXWDnsqjOBSMEW8Z4HiK/8RrPZBsKLts8dJxKF4pygOdJb0CWk8k/X1jbcfdxo+zOLjOMvJcSJ2pFdJmQHU+JufB3rePziqQ2S9Ur6sccr9XnTC1GVBWN4Lf5VHq+vf+bFJjVwg+2hrySZnAVfcOrxoqFLErr7ug1zN2nM1kcpgA4VWn4gxlJtYNYYq+9WxX5dtvnNANlG3ZCrRKQzl8lxtzoF6Zo7LUhEqPaHDwn7Rvs+IdbOn41lF5UDTJGqmC4gS/bZydW2Fy3YWm4aSaN9fgFf8D+PVkrlKAZB7gBLz1TyHjbcRf85cYF+GKKrDld5SzMB/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qWhhXjRrdKOEoStYAaikdLu5ZXr7vfb0ZaDh+ZwTQtbSMFolyOkecwI81MCdbMfT/1TqIGTOdAj5as9fAakk0jb2pXgUYQ8X1DVTR8ahSDVEaw9VTmWiSvTxvguVJ1Mb7gG4Gmh6aviDTJhfXtH4rPUNXhDLqrTH8JkJjyKROOMakIF68Hjse5vUfUxreBEOtb5r1Coa2Fe7ncJayaSE7ryrDbFqpZ 36UMAx4ulWMyqJajLNGY0DdG8qIsR5nxRhrnK/mrCidZ8F9/D3bWAl4rjtHlsztN59 +AnW5l0HsQcY9ntFL/zEBOaonjdJf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2024-07-15 at 14:47 -0400, Thomas Simpson wrote: > I have a large database (multi TB) which had a vacuum full running but th= e database > ran out of space during the rebuild of one of the large data tables. >=20 > Cleaning down the WAL files got the database restarted (an archiving prob= lem led to > the initial disk full). >=20 > However, the disk space is still at 99% as it appears the large table reb= uild files > are still hanging around using space and have not been deleted. >=20 > My problem now is how do I get this space back to return my free space ba= ck to where > it should be? >=20 > I tried some scripts to map the data files to relations but this didn't w= ork as > removing some files led to startup failure despite them appearing to be u= nrelated > to anything in the database - I had to put them back and then startup wor= ked. >=20 > Any suggestions here? That reads like the sad old story: "cleaning down" WAL files - you mean del= eting the very=C2=A0files that would have enabled PostgreSQL to recover from the cras= h that was caused by the full file system. Did you run "pg_resetwal"? If yes, that probably led to data corruption. The above are just guesses. Anyway, there is no good way to get rid of the= files that were left behind after the crash. The reliable way of doing so is als= o the way to get rid of potential data corruption caused by "cleaning down" the datab= ase: pg_dump the whole thing and restore the dump to a new, clean cluster. Yes, that will be a painfully long down time. An alternative is to restore= a backup taken before the crash. Yours, Laurenz Albe