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 1mcBbY-0004d2-JJ for pgsql-general@arkaria.postgresql.org; Sun, 17 Oct 2021 19:13:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcBbX-0001vK-00 for pgsql-general@arkaria.postgresql.org; Sun, 17 Oct 2021 19:13:55 +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 1mcBbW-0001vB-KA for pgsql-general@lists.postgresql.org; Sun, 17 Oct 2021 19:13:54 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mcBbU-0006VR-2b for pgsql-general@lists.postgresql.org; Sun, 17 Oct 2021 19:13:54 +0000 Received: by mail-wr1-x434.google.com with SMTP id m22so37326692wrb.0 for ; Sun, 17 Oct 2021 12:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rq0j17+uKCbI5JH1pmsqPvIN0EQyb1t1kZDE3BmxywE=; b=eiVbvWzkbEmxM1XZ8hQa9tNVQy604HUs9FiSA9/xRvkZm+kkh5hUu3Pxsv4yQ78lAA DXDjZTSXCA1hxnO3uk79nB429uuG0PTYeiv2BX7fFwpdsUOS32v46A0AAhbD8BDT3bDT kIGVAl1vH3ChQ0VGBrPZ+/SF5CZIh/U/lxL4fJWx+QMOKj0iVIleuX1r9C+B3lryNRcS BsHZTzjZgkgNdckIblUJKnQCt5ayc9kTHxjbTZmLnvg2tFpYYqwTSwUzhiyV/vKQXt7o cz6kL0lQmQ5VMw0/7bFW0f4lIjteXebNz1zFY1JeiDoN+I+nsLMK5fj/6Y1dJJpEL6jx boRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rq0j17+uKCbI5JH1pmsqPvIN0EQyb1t1kZDE3BmxywE=; b=V00a79qHJh54EmV76O3VYkCGztukPky4flIlajlZV7gBp0tslH88+wKXA+rSmJmJvy M8P8TBkjpOG/rCBlsjD4y3BHmJLgZw3wftfSR+RCSb7ii251z16W49QDk9WRgQZdiPH4 k23jrx+FDB7R5PQaYkOfgEdOfmCNHtFIBWrymH0qu+czpz76o0tuN5ryTXQoT525J2/t WME7LCbS/Z5KxXwPklIenm2orufvWTx+IccgmI5YEEkf26WXjwJzWfoy4LBDxm+7knrm ZCaFBZAAxNhfzZpQ0rM0JlH/mFGHxrFzS0pk5shO8YA3pciznD/2fSViODHq8NLF35Fd LYDw== X-Gm-Message-State: AOAM530KnHLDJqLzzHAO3H5yWaAWNPPXbL2O8mZK+IBJJKrXRpDYGNIS 2293GzAlCwC1QRTNROtuWxo= X-Google-Smtp-Source: ABdhPJzptVcvzkoC8e6/TIefneuAiuJ85qTMlojJ2z0QJ2/Jlmk51q0mB9VeThBAbkmBF7j9R2lN9A== X-Received: by 2002:adf:e7d0:: with SMTP id e16mr30030895wrn.283.1634498030749; Sun, 17 Oct 2021 12:13:50 -0700 (PDT) Received: from smtpclient.apple (ppp-94-66-221-255.home.otenet.gr. [94.66.221.255]) by smtp.gmail.com with ESMTPSA id l124sm16857985wml.8.2021.10.17.12.13.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Oct 2021 12:13:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Force re-compression with lz4 From: Florents Tselai In-Reply-To: Date: Sun, 17 Oct 2021 22:13:48 +0300 Cc: Magnus Hagander , pgsql-general , Ron Content-Transfer-Encoding: quoted-printable Message-Id: <08686473-CF87-4B7B-80D1-71B0FA97C1E5@gmail.com> References: To: Adrian Klaver X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I did look into VACUUM(full) for it=E2=80=99s PROCESS_TOAST option which = makes sense, but the thing is I already had a cron-ed VACUUM (full) = which I ended up disabling a while back; exactly because of the = double-space requirement. The DB has already a 1TB size and occupying another 600MB would require = some hassle. Thus, the external script approach makes more sense. > On 17 Oct 2021, at 8:28 PM, Adrian Klaver = wrote: >=20 > On 10/17/21 10:17, Magnus Hagander wrote: >> On Sun, Oct 17, 2021 at 5:12 PM Florents Tselai = > wrote: >=20 >> Is there a smarter way to do this ? >> It should be enough to VACUUM FULL the table. (but it has to be = VACUUM FULL, not a regular vacuum). Or CLUSTER. >=20 > With the proviso that this will require double the existing space, = ~670GB, until the operation is completed. >=20 >> --=20 >> Magnus Hagander >> Me: https://www.hagander.net/ >> Work: https://www.redpill-linpro.com/ = >=20 >=20 > --=20 > Adrian Klaver > adrian.klaver@aklaver.com