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 1hBbxF-00036G-AL for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 09:13:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBbxD-0004Aj-H3 for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 09:13:07 +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 1hBbxC-0004Ab-W4 for pgsql-general@lists.postgresql.org; Wed, 03 Apr 2019 09:13:07 +0000 Received: from smtp50.i.mail.ru ([94.100.177.110]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBbx8-00048X-8z for pgsql-general@postgresql.org; Wed, 03 Apr 2019 09:13:05 +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:MIME-Version:Date:Message-ID:Subject:From:To; bh=gzTUUKWvXEeWnOLDhE6F0GQz2R8D7Z1U2JswbU2Ya9A=; b=Hmldf/HDZ+eZloaP6oi5J6+MDxQMyhhIsecDf30qmxdsC8R2VbxW8kvuWmye1cASNERT87oAghxs8UnKeCuH4Ye1Jus+Z5lo96UQqjcwKQTsanlQ5zMRtzVjy73+fz05PW/4HC4boRJx3h9szef8x1ch3j2sphXZ+eYMLeqKWWE=; Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1hBbx4-0004u4-F9 for pgsql-general@postgresql.org; Wed, 03 Apr 2019 12:12:58 +0300 To: pgsql-general General From: rihad Subject: Re: Recommendation to run vacuum FULL in parallel Message-ID: <9ed59ae2-6eb1-549d-eb05-d1546fd11515@mail.ru> Date: Wed, 3 Apr 2019 13:12:56 +0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Authentication-Results: smtp50.i.mail.ru; auth=pass smtp.auth=rihad@mail.ru smtp.mailfrom=rihad@mail.ru X-77F55803: CF41D5CA8C6D3C0C7F9F52485CB584D7FE68477BFBFC01B4B9490D1C91EFC6F708C1DC5404F5A3E284CFB5AB2C179FEA660823B2EEFD31DC X-7FA49CB5: 0D63561A33F958A5F972B09E3AD825CCC6B024DCF1DF712E8186437C96DBCAE68941B15DA834481FA18204E546F3947CEDCF5861DED71B2F389733CBF5DBD5E9C8A9BA7A39EFB7666BA297DBC24807EA117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364767815B9869FA544D8D32BA5DBAC0009BE9E8FC8737B5C2249D99FB7B2A39B49613AA81AA40904B5D9CF19DD082D7633A0E7DDDDC251EA7DABD81D268191BDAD3D78DA827A17800CE7FBC5FED0552DA851CD04E86FAF290E2D40A5AABA2AD3711975ECD9A6C639B01B78DA827A17800CE75B6467FD6694504EE66BE8781669378EEFF80C71ABB335746BA297DBC24807EA27F269C8F02392CDCDCF839C8780CBD93C9F3DD0FB1AF5EB4E70A05D1297E1BBCB5012B2E24CD356 X-Mailru-Sender: B19AB4DAF1EA2FB5E46AF57E2DF2A7A1D1B327E1FF98280DCB132EC00299D056064B8FEF34F63F30ABBFE0CF075BC50BFB559BB5D741EB96004FA9CEFBA991DA3A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: OK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > Does *every* table have *so much* free space that it's impractical to > just > let the files just get refilled by normal usage? > Ideally VACUUM FULL should not require a giant lock on the table. 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. So DB size (as witnessed by psql's \l+) uses 5-6x times the space it actually needs. And using vacuum full is prohibitive because of the exclusive lock it takes on the table, preventing both writes and reads. Since rewriting a table is a completely internal operation from clients' POV, hopefully one day we will see a concurrent version of vacuum full.