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 1l7bUW-0005Kf-PW for pgsql-general@arkaria.postgresql.org; Thu, 04 Feb 2021 10:04:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7bUV-0001UN-Jx for pgsql-general@arkaria.postgresql.org; Thu, 04 Feb 2021 10:03:59 +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 1l7bUV-0001UF-8p for pgsql-general@lists.postgresql.org; Thu, 04 Feb 2021 10:03:59 +0000 Received: from mx4.stadt-zuerich.ch ([194.56.33.13]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7bUS-0005LN-DP for pgsql-general@postgresql.org; Thu, 04 Feb 2021 10:03:58 +0000 IronPort-SDR: b1aYbzZx3WajYqN+B06c8bVb/uF4keMaCEqVz6uv04wGk8GVGxvqQQUsUNOZvHEn/TQwkSX+dj 5gWJ9UzkhoQWAhOV+O9FrSOUNzp3jmqxNma7hetcFAt/oBMia0failIFS71/5fajHdHn5abAvG A0AZjsXLihJZKMPZk5mdE9ZmdiYcXtLmRsDSnoFmSMJKB6HiB/Pjox0LYjIGfputTbf3y2T6FN WhRtVhE5VwksMP1lX59IzSIM8+nrrQ4e8dKvd1NnRK92+nMMAvM/ciZYhJ3EWG1aCbRbn3nU+c p7A= X-IronPort-AV: E=Sophos;i="5.79,400,1602540000"; d="scan'208,217";a="13043554" Received: from unknown (HELO SZHM27375.global.szh.loc) ([10.7.49.70]) by mx4.prm.szh.zone with ESMTP/TLS/AES256-GCM-SHA384; 04 Feb 2021 11:03:53 +0100 Received: from SZHM27370.global.szh.loc (10.7.50.50) by SZHM27375.global.szh.loc (10.7.49.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Thu, 4 Feb 2021 11:03:53 +0100 Received: from SZHM27370.global.szh.loc ([fe80::2839:247b:c8d4:9198]) by SZHM27370.global.szh.loc ([fe80::2839:247b:c8d4:9198%10]) with mapi id 15.01.2044.004; Thu, 4 Feb 2021 11:03:53 +0100 From: "Zwettler Markus (OIZ)" To: "pgsql-general@postgresql.org" Subject: curious vacuum full behavior Thread-Topic: curious vacuum full behavior Thread-Index: Adb63KrMEwPxqxHXQlSgRGdKKuNjBw== Date: Thu, 4 Feb 2021 10:03:53 +0000 Message-ID: Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.48.249] Content-Type: multipart/alternative; boundary="_000_d9e34b260bfe45b280005f6cdc2814f7zuerichch_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_d9e34b260bfe45b280005f6cdc2814f7zuerichch_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 =3D '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 Thanks, Markus --_000_d9e34b260bfe45b280005f6cdc2814f7zuerichch_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I ha= ve 2 identical systems A + B.

B be= ing a clone of A.

 

 

The = table pg_catalog.pg_largeobject was identical on both systems: 300GB in tot= al size; 100GB bloated.

 

 

I di= d following on A:

ð  vacuum full pg_catalog.pg_largeobject;

(usi= ng the default maintenance_work_mem of 64MB)

It t= ook around 45 minutes and increased the diskspace by around 125% until the = vacuum had been finished.

 

 

I di= d following on B:

ð  set maintenance_work_mem =3D '256MB';

ð  vacuum full pg_catalog.pg_largeobject;

This= took around 5 minutes. I don't know if the diskspace ever increased.

 

 

I wa= s really surprised.

Is t= here any explanation on this behavior?

Is v= acuum full heavily using on-disk sort areas if maintenance_work_mem is too = low?

 

 

Post= gres Version 9.6

 

 

Than= ks, Markus

 

 

--_000_d9e34b260bfe45b280005f6cdc2814f7zuerichch_--