Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1idN1u-0005gs-E6 for pgsql-performance@arkaria.postgresql.org; Fri, 06 Dec 2019 23:28:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1idN1s-0006jy-MS for pgsql-performance@arkaria.postgresql.org; Fri, 06 Dec 2019 23:28:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1idN1s-0006g5-45 for pgsql-performance@lists.postgresql.org; Fri, 06 Dec 2019 23:28:56 +0000 Received: from mail-yb1-xb42.google.com ([2607:f8b0:4864:20::b42]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1idN1p-00031g-6B for pgsql-performance@postgresql.org; Fri, 06 Dec 2019 23:28:54 +0000 Received: by mail-yb1-xb42.google.com with SMTP id j6so3649453ybc.11 for ; Fri, 06 Dec 2019 15:28:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wlcAnaO9dOEFwpPegJ0HJY2cBwbSzPBduPmzhm7bW+I=; b=vS4YutLUto/ZIrBAdhecQGU/XtNTaXxFiOL9Wt10sFETgY/sNaakHi5hNtsLaDWP+D BuOy3Ih7BAMcclUc5wgX42Ckkwx69mqIHiM3xEeCDvrJSzvf0Tlr1e+3y6+Z5UTJbRxt QzNql8QSAWSj5cnP+fn2cjUspk1HdclcBARS3EpC2GRqqZal2t7fl4CeHICuDMLEzZBB TBs4n+N9C+jJFho37TWanuMFG/YNcqhIGfRQRIH0A9rpHZIzmeo9SpthcPId0BVL52dB RJvEnbLb+ArCF/maVmIzr3D4LMbd9qE6rlHAqz4uwYfBZLgFDIxmtp8EOsI9O+oq2xg1 zFJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wlcAnaO9dOEFwpPegJ0HJY2cBwbSzPBduPmzhm7bW+I=; b=PE/7cAyMx3tzRhAKiMqIKRXoIx+HI9zwvpcA/rhrBf/xJHTPaBlLOsq8AMMoJB2x4L tDBq5Qf3DlL/LdjedsL+wvcd+I5/NOHZRoJbvtZZdxuGzibI8tsmM0CupG58NE+pNCu7 qnxU1zDVvh9nbEZienp+M7C5i4Yq7no+cDHOmV6034zBPFQHoRSKb608CfE/7xag38sY fDuvEidZUU2cq43TaAi8p7E8wEtkJaSctAwD+Q8oGMY8zY+FBOomHhfFiWXc5xbukHl0 BcYjlFDS3Xjkk06AUFwIJT7QsF80/dV5HkotkgAbNHtCNdsjRNCSKhRY9iF+1Dmz/0xb OlIQ== X-Gm-Message-State: APjAAAVbWgkhmgSPnejNsdNW8Pz8XQSPVZMunEQ01OE7Bh7b7IK4PoxH tx3LapcB5PUzcyDjANggls47Sg== X-Google-Smtp-Source: APXvYqwio2DRB8yNvtqTO3q9yWZi7km76cr/5WvVqhoz6V35xFbGboq0Z5iKAp7HrVKbTAovQiUwFQ== X-Received: by 2002:a25:cf55:: with SMTP id f82mr12505151ybg.203.1575674932093; Fri, 06 Dec 2019 15:28:52 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id y17sm6921943ywd.23.2019.12.06.15.28.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Dec 2019 15:28:51 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id B2F19800A81; Fri, 6 Dec 2019 17:28:49 -0600 (CST) Date: Fri, 6 Dec 2019 17:28:49 -0600 From: Justin Pryzby To: Mike Schanne Cc: pgsql-performance@postgresql.org Subject: Re: unexpected result for wastedbytes query after vacuum full Message-ID: <20191206232849.GT2082@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Dec 06, 2019 at 05:18:20PM +0000, Mike Schanne wrote: > Hi all, > > This question is somewhat related to my previous question: > https://www.postgresql.org/message-id/0871fcf35ceb4caa8a2204ca9c38e330%40USEPRDEX1.corp.kns.com > > I was attempting to measure the benefit of doing a VACUUM FULL on my database. I was using the query found here: > https://wiki.postgresql.org/wiki/Show_database_bloat > > However, I got an unexpected result in that the "wastedbytes" value actually increased for some tables after doing the vacuum. > I was wondering if the fact that we use a json column could be interfering with the wastedbytes calculation. Can anyone explain how wastedbytes could increase from a vacuum? Is it due to dropped columns, like Tom explained here ? https://www.postgresql.org/message-id/18375.1520723971%40sss.pgh.pa.us