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 1hBZHo-0003Cd-H1 for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 06:22:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBZHl-0001Vx-BR for pgsql-general@arkaria.postgresql.org; Wed, 03 Apr 2019 06:22:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBZHk-0001Rb-Sp for pgsql-general@lists.postgresql.org; Wed, 03 Apr 2019 06:22:09 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBZHi-00040N-Jk for pgsql-general@lists.postgresql.org; Wed, 03 Apr 2019 06:22:08 +0000 Received: by mail-ot1-x331.google.com with SMTP id o74so14444341ota.3 for ; Tue, 02 Apr 2019 23:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=vQw1FjnQXb+YSUmJXcgt9AEHGS72tJa6o6fShmpSOps=; b=J/up7NLenRtabCQfepb29W+HQWdmCqPQdZm+iRYCQpPrbu6ps8wBu7tMRRZOddaONU Fff6hHEU+qcTmhDwKUfzNIh8Y3duvOdZClF2qlKITTVXob7atBjvi2zaVD5jfPBABZ2V EHKNtuW7YLeD0gbtAk+B0UmFu5liSNrN67oz7EwhUDVNOQ4o11exDpDnNyMBddzutdTZ 9VhWO72Kliars6ofaY0q32PC5U18QSlcEpwP+Fg2BOHrre8eWcwC75oir1rqovdjT+Ra KXK0uXOefiOshGZfXchQJU/kqquAOf6xYfYZOC581lv/bBjHF29c5ii73zbtArnx6CsV +bqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=vQw1FjnQXb+YSUmJXcgt9AEHGS72tJa6o6fShmpSOps=; b=R0h5uA+C2ECdIcBUuG/CcLbDs0X/nerJQRZDXuik6AIHiDp9dW6aYN+x0716JSrQg2 vvQY2QFt8loMVkLGmr9E9peV3uIk3vxHWBIwXFb6pd3aZr/I9GIMwE/gaEnQvEM9RLCs +oxPN46LldDcuXdcT07ne0qnFH5TH0l67SOL7GRTBOZlJ5FBUximP9m+swkePO79bU26 oNDDG0gEyQAxL1gKDicg2tnePvA1BaGyYbKpsdp7P2Cvv2E13vpZnCHWGM6QtY8Anvna ZNcM4SudUxi5EYkpFvHO6LNBy3M77VYPYONkQOiWcBUr36C59lP+6IJ1513dE+OVeYLS OJIg== X-Gm-Message-State: APjAAAUoZYNY6Os7Ysx3C8EL7yiyvedtyvjgSSJgd/2QcbG8Tp0Ar2GN YZ1yzaF2HWPks/SmUAOcxgVrhzGE3EU= X-Google-Smtp-Source: APXvYqyMIUaG+yCIK+n6B+5siMGGGh5bQjg1BC6objH76A26zIwbXMUlN3pcMl/u5XR/8I2hjl5mGQ== X-Received: by 2002:a05:6830:2094:: with SMTP id y20mr51777637otq.316.1554272523773; Tue, 02 Apr 2019 23:22:03 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id w11sm6211851otq.9.2019.04.02.23.22.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 23:22:02 -0700 (PDT) Subject: Re: Recommendation to run vacuum FULL in parallel To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Wed, 3 Apr 2019 01:22:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------53286D8C671B0E7572AE83C7" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------53286D8C671B0E7572AE83C7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 4/3/19 12:50 AM, Perumal Raj wrote: > Hi ALL > > We are  planning to reclaim unused space from 9.2 Version postgres Cluster, > > Method : VACUUM FULL Does *every* table have *so much* free space that it's impractical to just let the files just get refilled by normal usage? > 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;) > > 2. If we run vacuum full, Do we need to run REINDEX/ANALYZE exclusively ? > > 3. What is the best way to run VACUUM FULL with less window. A good way to run *any* task like this in parallel is to generate X lists of objects, and then process each list in parallel. -- Angular momentum makes the world go 'round. --------------53286D8C671B0E7572AE83C7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 4/3/19 12:50 AM, Perumal Raj wrote:
Hi ALL

We are  planning to reclaim unused space from 9.2 Version postgres Cluster,

Method : VACUUM FULL

Does every table have so much free space that it's impractical to just let the files just get refilled by normal usage?

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;)

2. If we run vacuum full, Do we need to run REINDEX/ANALYZE exclusively ?

3. What is the best way to run VACUUM FULL with less window.

A good way to run any task like this in parallel is to generate X lists of objects, and then process each list in parallel.

--
Angular momentum makes the world go 'round.
--------------53286D8C671B0E7572AE83C7--