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 1o5l53-0007Dl-KD for pgsql-general@arkaria.postgresql.org; Mon, 27 Jun 2022 09:30:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o5l52-00026V-HL for pgsql-general@arkaria.postgresql.org; Mon, 27 Jun 2022 09:30:52 +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 1o5l52-00026J-4z for pgsql-general@lists.postgresql.org; Mon, 27 Jun 2022 09:30:52 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o5l50-0007xT-Nk for pgsql-general@lists.postgresql.org; Mon, 27 Jun 2022 09:30:51 +0000 Received: by mail-wr1-x42c.google.com with SMTP id o16so12157009wra.4 for ; Mon, 27 Jun 2022 02:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=pzDJwRMjvnl3kCq+1gBtRnheL3Y+1PRyLh75zC34j9E=; b=Gwj49a1HFjmDojNT1gC/BSvTt8FFadFX7QujZcMKMOWgWYLvbPw97uxMB/hwEh2FRL LJ6jIv7Dh6nwH86CHnx2xRxem0S22mLXwzdqp5VwwHBhgcfvwQz5XcooFcaOGPyIuPf7 Gl+8FolQAJrZ+zLsMLqYbAj3K9MfbbMbiN/c662mQwS63pyb2rWUTWFY+PVTdGRUCVAd VBxL0jL4Nh12TSe1cUzzey3I7sSkDJwIoVSJsl8b3N4xOmyNE6G7VFU3T9wgHE/M0dcI 3HP7mue6dVP3SURD0dkpg7cOPsEvLgZtBPdOCBrzB+nwZ9nMNVl7pMErSB2ZSR4e8rt8 Vf6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=pzDJwRMjvnl3kCq+1gBtRnheL3Y+1PRyLh75zC34j9E=; b=c/RpYn3KRqX+qLHE8lf5uE0XDYgzrmnJ+Lj0M8HIhqZ3R0Kt0hNZrzEqKoy9ROg/uF UMlhUnA0rXGbnCQ7V3+hCEHZ5wiPyVl3p4q3KZfXQAeoMBM3x9o5ZruMlNuFJOFM7lNf KQL5JF7ORoror1PkcNHNLk0RVA3zQnGaVey+q+id4JSorWXwUBTdsQfViaour7qmvcxk /rPQAVk2fupB6DPh5ZNOJiahRvDqcG3MGKJzcsjI1o8ZkercEcW7z6vBBqxiNMslLpr+ LoE/0s+nDp6rigN546q91WQZGsLfz+bYoBSvJnWr9OctV+HV0LBJ7q81hUh0SW5EOPaW 21Xg== X-Gm-Message-State: AJIora+rueOpee1V4onpeZw3IT0taglNcPazugZmb3QXzVs6dJBQC/Ow qRM1vKT/VN6uI/2KiTmsG96Fw4Qgm0wKkg== X-Google-Smtp-Source: AGRyM1tK5BOzwJ5xbdrqxy2YB/Y9BypeprWqE0P81e0qlRNPUTXq0GbXnaTgX5+fIAaBFFud1z+DaA== X-Received: by 2002:a5d:598c:0:b0:218:3fe6:40bd with SMTP id n12-20020a5d598c000000b002183fe640bdmr12186991wri.373.1656322248569; Mon, 27 Jun 2022 02:30:48 -0700 (PDT) Received: from smtpclient.apple (ppp-94-66-221-109.home.otenet.gr. [94.66.221.109]) by smtp.gmail.com with ESMTPSA id t18-20020a1c7712000000b0039749b01ea7sm15067231wmi.32.2022.06.27.02.30.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jun 2022 02:30:47 -0700 (PDT) From: Florents Tselai Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Table space not returned to the OS ? Message-Id: <35BEB990-A045-413D-8F0F-EA372754960C@gmail.com> Date: Mon, 27 Jun 2022 12:30:45 +0300 To: pgsql-general X-Mailer: Apple Mail (2.3696.100.31) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, A few months back (October) I had upgraded a Postgres instance from v12 = =E2=80=94> 14. The database disk size under /var/lib/postgresql/12 was around 800GB+ = back then. Note, that IIRC I had used hard-linking during the upgrade. In the database itself, lots of things have changed since.=20 In fact, that database itself has been dropped at some point and = restored from a backup. As I was running out of disk space, I started investigating and found = out that=20 /var/lib/postgresql/12/main/base/16385 =E2=80=94> 886GB+=20 /var/lib/postgresql/14 =E2=80=94> 400GB The last modification date on that directory (../12/) appears to be = around a month ago, When the table with relied 16385 was in fact dropped. Now, In my update scripts (I use this db as an OLAP) I occasionally run = VACUUM. Is it weird that the 886GB space hasn=E2=80=99t been returned to the OS = yet?=20 What=E2=80=99s the safest way to return it to the OS manually? Thanks