Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfJuw-0000wb-1t for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 09:38:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfJuv-0006S0-1U for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 09:38:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfJuu-0006RZ-OW for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 09:38:20 +0000 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kfJus-000477-3g for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 09:38:20 +0000 Received: by mail-oi1-x234.google.com with SMTP id w145so1494163oie.9 for ; Wed, 18 Nov 2020 01:38:17 -0800 (PST) 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-transfer-encoding:content-language; bh=2nZRaOVRFKSJhauRmuyhEiH2naFUo+sQZO8Q1iY4qZI=; b=dq03GRDKDqSohqLri1uJV2H+BYOWOsQo6Su9H+PBH4oy+Mk6a7b11S6xsqjEkNOCeh UPOpO7KI52mRkZl6SYq1lI4uBBsRZM+B69pVP4R3rZLJIGSZYax0dWA7AVIZf2zvJtRq HHkHcKI7SRlVXBDNKIylAOxvKALmMJbEjWdnwW8qm+dk2+sMcyVNexDGOQ2DTg9q/YaJ qrxPRpsJnCIvsJ4btWTTR88bcJOnjJhc859YY1ewPQov4n5Fr4ZzDMkP5Xyjaumwli1M m3THwbArEYaHinvyHgfX1sQMh4fVb7/Nb5JZ2BSFWleC3+Bck9mq+aZFUUIjKYpXS3JR YBVg== 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-transfer-encoding :content-language; bh=2nZRaOVRFKSJhauRmuyhEiH2naFUo+sQZO8Q1iY4qZI=; b=I4cSgIa1VCtUTJFlTOtLLCSVTyV3V6uwgCCGEFybeRZ+8Jjic910pKhjLA9lnllKvI jW9u830BBO5m1bBi3oOxWulruE1MG1WOGe3zxmdL3rX+9nQ5rqxJR8mPbUxpdCPUI4Rg 354Q4L+7qcEl5/+oyXFE6abC2XAL0pGJ9kR0rjCvPa4tJIuGQITUNTEpl+w/kO36DOP5 wNOkXUeiWcobCdANlysFVXs7nmJV4hnNGszRIiFaRXKHqFIB2IYdapDInKwoRPWF1Ggh dcU3Zxf+qRyyqPs/Aeh6/+JR3Wk/QzxpkYkWmN4z43UnSWGoIbe7bEsRB0YhXjnb/Hcq lj4A== X-Gm-Message-State: AOAM532/2zCMIJSLuab55QLHKUWFpL47Uky0Oq7V/GRtMkFvcEw5p2Cn x4dg7ktItXNdDrI2/cEc93dfdpUPMDVFCg== X-Google-Smtp-Source: ABdhPJy742712IcC3nEXaNKeOSEzzg7iBYNa82Xx9UZU7IhHyDxDt6l7YEnXqrS17jQILsrTWTgFHg== X-Received: by 2002:aca:480f:: with SMTP id v15mr2216474oia.44.1605692295687; Wed, 18 Nov 2020 01:38:15 -0800 (PST) Received: from [192.168.1.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id k63sm4565731oif.12.2020.11.18.01.38.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Nov 2020 01:38:15 -0800 (PST) Subject: Re: vacuum vs vacuum full To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <57bae976-1533-b459-145a-82f76767099b@gmail.com> Date: Wed, 18 Nov 2020 03:38:14 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.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 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/18/20 2:33 AM, Atul Kumar wrote: > Hi, > > We have a table of 3113GB, and we are planning to vacuum it in non > business hours i.e. 12AM to 4AM, So my queries are: > > 1. What should be perform on the table Vacuum or Vacuum full ? The documentation *clearly states* the difference between VACUUM and VACUUM FULL. https://www.postgresql.org/docs/9.6/sql-vacuum.html > 2. Do we need to perform Analyze also? I always do. > 3. Will the operation be completed in the given time frame? how to > check the same. How in the heck do we know your system's hardware configuration? > 4. Who acquire lock on table vacuum or vacuum full. Read the docs. > 5. If the activity goes beyond time frame, do we have any option to do > continue doing t without acquiring lock on the table ? > > If you also need the structure of the table, Please let me know. > > Please help me by responding my query wise. -- Angular momentum makes the world go 'round.