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 1hBhCU-0002RT-Oa for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 14:49:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBhCT-0003TK-EY for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 14:49:13 +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 1hBhCS-0003T9-Rz for pgsql-general@lists.postgresql.org; Wed, 03 Apr 2019 14:49:13 +0000 Received: from smtp43.i.mail.ru ([94.100.177.103]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBhCP-0003Lr-2k for pgsql-general@postgresql.org; Wed, 03 Apr 2019 14:49:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=wPEORODbHoz4J/Talks3hpqGH+f7MNIMK5kXX73MNfE=; b=q1CS4ZOovA2xfCsub3nNvZJs9D5JcKVhaff6HdpqkBVtYwRCFn0Xnht1Vj2YoQs0NBU/J/m5eZLy4d+1LQDfK41cCTLUCqsKxknQU/31aJl1EvFNCviQCP1XKu2na4sIXhla1Dzux8nBZ0/bJiuDRuU1rkDO8GJLYRWSt89R5jU=; Received: by smtp43.i.mail.ru with esmtpa (envelope-from ) id 1hBhCL-0006CW-1D; Wed, 03 Apr 2019 17:49:05 +0300 Subject: Re: Recommendation to run vacuum FULL in parallel To: Michael Lewis Cc: pgsql-general General References: <9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru> From: rihad Message-ID: <22db5af2-5593-ef4c-485a-83f3495c48c3@mail.ru> Date: Wed, 3 Apr 2019 18:49:02 +0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Authentication-Results: smtp43.i.mail.ru; auth=pass smtp.auth=rihad@mail.ru smtp.mailfrom=rihad@mail.ru X-77F55803: 0014004E1F3277295A78504BD2AC2941AFE43FA5B39461242E500B95D9EC725637DBC861ACF484319E1EF2BAAF244209 X-7FA49CB5: 0D63561A33F958A5263BC66E09C9B3203248F6795DEBD9F2DBBC28751E4A4E288941B15DA834481FA18204E546F3947CEDCF5861DED71B2F389733CBF5DBD5E9C8A9BA7A39EFB7666BA297DBC24807EA117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364767815B9869FA544D8D32BA5DBAC0009BE9E8FC8737B5C2249668B94F0A65C3A0C3AA81AA40904B5D9CF19DD082D7633A0E7DDDDC251EA7DABD81D268191BDAD3D78DA827A17800CE7542AF255F21831B5CD04E86FAF290E2D40A5AABA2AD3711975ECD9A6C639B01B78DA827A17800CE79E02FD01001E44E0DB989F787A4F0CBFEFF80C71ABB335746BA297DBC24807EA27F269C8F02392CDCDCF839C8780CBD93C9F3DD0FB1AF5EB4E70A05D1297E1BBCB5012B2E24CD356 X-Mailru-Sender: B19AB4DAF1EA2FB5E46AF57E2DF2A7A1492DAEF1B21C534531CBEAF648F8F5530840CAA66A03E50EABBFE0CF075BC50BFB559BB5D741EB96004FA9CEFBA991DA3A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: OK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 04/03/2019 06:40 PM, Michael Lewis wrote: > "Sometimes a table's usage pattern involves much more updates than > inserts, which gradually uses more and more unused space that is never > used again by postgres, and plain autovacuuming doesn't return it to the > OS." > > Can you expound on that? I thought that was exactly what autovacuum > did for old versions of rows whether dead because of delete or update, > so I am surprised by this statement. I thought vacuum full was only > ever needed if storage space is an issue and the table is not expect > to quickly re-expand to current size on disk from new churn of tuples. From what I understand from the docs updates keep older versions of rows intact because other transactions might still use them (this is the essence of MVCC), and autovacuuming (plain VACUUM) marks that space as available when it is run, so future inserts can reuse it. In case the number of updates is much greater than the number of inserts, the unused zombie space gradually creeps up.