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 1hBZHz-0003DC-PW for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 06:22:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBZHy-0004VE-GU for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 06:22:22 +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 1hBZHx-00049a-Sm for pgsql-general@lists.postgresql.org; Wed, 03 Apr 2019 06:22:22 +0000 Received: from mx1.mailbox.org ([2001:67c:2050:104:0:1:25:1]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBZHu-0000H8-Iw for pgsql-general@lists.postgresql.org; Wed, 03 Apr 2019 06:22:20 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 0176A4BFCA; Wed, 3 Apr 2019 08:22:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id hT5kf8RxaVHN; Wed, 3 Apr 2019 08:22:06 +0200 (CEST) Message-ID: <9de455158b3a777b2ed6cbe25ff7fc2d4f3a8a9c.camel@cybertec.at> Subject: Re: Recommendation to run vacuum FULL in parallel From: Laurenz Albe To: Perumal Raj , pgsql-general@lists.postgresql.org Date: Wed, 03 Apr 2019 08:22:05 +0200 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Perumal Raj wrote: > We are planning to reclaim unused space from 9.2 Version postgres Cluster, > > Method : VACUUM FULL > DB Size : 500 GB > Expected space to reclaim 150 GB > work_mem : 250 MB > maintenance_work_mem : 20 GB > > Question : > > 1. vacuumdb --j option (Parallel) not available for version 9.2. > How to run vacuum full in parallel ? At present its taking 8Hrs if i run sequential ( vacuum full verbose;) Run several scripts in parallel, where each of them vacuums some bloated tables. Be warned that VACUUM (FULL) is quite I/O intense, so too much parallelism might overload your I/O system and harm performance. > 2. If we run vacuum full, Do we need to run REINDEX/ANALYZE exclusively ? You don't need to run REINDEX, because that happens automatically. You can use VACUUM (FULL, ANALYZE) to also gather statistics. > 3. What is the best way to run VACUUM FULL with less window. Identify which tables really need it rather than VACUUMing everything. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com