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 1l7VKw-0006Bz-3K for pgsql-general@arkaria.postgresql.org; Thu, 04 Feb 2021 03:29:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7VKv-0001fC-1T for pgsql-general@arkaria.postgresql.org; Thu, 04 Feb 2021 03:29:41 +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 1l7VKu-0001f5-QI for pgsql-general@lists.postgresql.org; Thu, 04 Feb 2021 03:29:40 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7VKs-0002Hy-Cu for pgsql-general@lists.postgresql.org; Thu, 04 Feb 2021 03:29:40 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1l7VKp-0004aW-6q; Wed, 03 Feb 2021 22:29:35 -0500 Date: Wed, 3 Feb 2021 22:29:35 -0500 From: Bruce Momjian To: Craig McIlwee Cc: Simon Windsor , pgsql-general@lists.postgresql.org Subject: Re: Database upgrade Pg11 to Pg12 issues Message-ID: <20210204032935.GA3887@momjian.us> References: <8e6d09bd-d992-e6da-b3bd-a32670f94fac@cornfield.me.uk> <20210203233235.GA11064@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Feb 3, 2021 at 10:07:03PM -0500, Craig McIlwee wrote: > > (replying to the entire list instead of Bruce only this time...) > > > > This doesn't make sense to me.  Since we hard-linked, why would 12 be so > much smaller?  If it was symlinks, I could imaging that, but it doesn't > use symlinks, just hard links, so it should be similar.  Please look at > the size of main/base on both, since that is where your data is.  Maybe > 11 just has a lot of old WAL that isn't copied. > > > > It depends on how the directory sizes were measured. "du" won't count the same > file more than once, so if space was measured using one of the following > commands: > > du -hs /var/lib/postgresql/ > du -hs /var/lib/postgresql/11/main /var/lib/postgresql/12/main  > > Then you would see a large value for the 11 directory and then the 12 directory > would only show the files that weren't already counted when measuring the 11 > directory.  Running du on each version's directory separately might give > results that are more in line with expectations. Yes, I was assuming the du commands were run separately on each directory. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee