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 1l7d29-000096-9z for pgsql-general@arkaria.postgresql.org; Thu, 04 Feb 2021 11:42:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7d28-0001kA-7U for pgsql-general@arkaria.postgresql.org; Thu, 04 Feb 2021 11:42:48 +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 1l7d28-0001k3-0G for pgsql-general@lists.postgresql.org; Thu, 04 Feb 2021 11:42:48 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l7d24-00062U-5c for pgsql-general@postgresql.org; Thu, 04 Feb 2021 11:42:47 +0000 Received: by mail-ej1-x634.google.com with SMTP id p20so4781174ejb.6 for ; Thu, 04 Feb 2021 03:42:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=nVA17toM1eotTMVkUVD67x86esI29ypJeqarz1FlcCk=; b=PEBrzr0laopw6lmquqaZz0h+m7wwgKrUqbuNYk4DIrCK1+5oWkgVxyOf3E+l1YuVek 5x9bpKX6CCK6RaKcU8tOZBeKlQO6DZ1TNh9nUAVe39QLTfgGMHdP83lq53wl08TfPvGi SPEI9XO/z1j79ZUMR/1C+M8qAewHT5WaDses1EB1GhiuHx+y9bgqHIeX8tvalsjwORPo sr5eBmRzWhzMgwj7Zy5pFOiFznY/ps7ofr0ke3JEkBDGQXkiXcFmmxYAEIGggfbUcVzx sacZKYjP6adEaywnqWfHJjGfbtmk1dAL7HeY2kK/pzwrG2C6cDhv2s6UkNugqWPF7WBf kmoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=nVA17toM1eotTMVkUVD67x86esI29ypJeqarz1FlcCk=; b=dTfythZJiSrxgxb5AEAnI9F5bpR5tq/Nl1UJ6hiHX4KnKEBJ7inj2PcD013+F0y5KE aYn4MA8BdFcW2NMx7sAj/B5LXRQ9PfgVZyRh71C0eDLSo6cway4jkcENO/3rWQ4aP3CT d3SQU8lj8fLcvS+1T5uFGmlmMJgGCcypy0WT4lVeR0QNlI4sY8oIRLDTFt7kZbkAEddN wxm1NDMWjwWxonpFRm46xq52ivBLTOq8Rct1/LmuiANHnreMfJvG3I+9E4b9kPJm9Uo5 FVKfzUbsvjDPq3m3yKVa/tQ0cNKS4J2faS5AlS1DOjSpko/IWmy5BoiZfapwsdNg4vPx Vk0w== X-Gm-Message-State: AOAM5312pDv85U3qXFFEnsvnsJr55YAYj2gBp8KTtxtFLjzkEhmzjmck 0k9ezoEYxQUs7jcyfwBEpg+Xfw== X-Google-Smtp-Source: ABdhPJyZZOxw4iDldVdG+l3JUkQKWdCAbZ2q9b7yLQnHRUyOfxPnqKDU/QL0a8J/2Xs3UpnfM/qy1w== X-Received: by 2002:a17:906:1c11:: with SMTP id k17mr7397974ejg.70.1612438962926; Thu, 04 Feb 2021 03:42:42 -0800 (PST) Received: from localhost.localdomain (217-149-171-72.nat.highway.telekom.at. [217.149.171.72]) by smtp.gmail.com with ESMTPSA id b17sm2302725edv.56.2021.02.04.03.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 03:42:42 -0800 (PST) Message-ID: <698d93bea415d0f5ba94cbf3c6d0fe8194b4931d.camel@cybertec.at> Subject: Re: curious vacuum full behavior From: Laurenz Albe To: "Zwettler Markus (OIZ)" , "pgsql-general@postgresql.org" Date: Thu, 04 Feb 2021 12:42:38 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 2021-02-04 at 10:03 +0000, Zwettler Markus (OIZ) wrote: > I have 2 identical systems A + B. > B being a clone of A. > > The table pg_catalog.pg_largeobject was identical on both systems: 300GB in total size; 100GB bloated. > > I did following on A: > ð vacuum full pg_catalog.pg_largeobject; > (using the default maintenance_work_mem of 64MB) > It took around 45 minutes and increased the diskspace by around 125% until the vacuum had been finished. > > I did following on B: > ð set maintenance_work_mem = '256MB'; > ð vacuum full pg_catalog.pg_largeobject; > This took around 5 minutes. I don't know if the diskspace ever increased. > > I was really surprised. > Is there any explanation on this behavior? > Is vacuum full heavily using on-disk sort areas if maintenance_work_mem is too low? > > Postgres Version 9.6 VACUUM (FULL) will re-create the indexes too, and "maintenance_work_mem" has an impact on index build speed. But I have no explanation for such a large difference. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com