Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmMA-00028r-SU for pgsql-general@arkaria.postgresql.org; Wed, 18 Jul 2018 13:19:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffmM8-0004AV-Qv for pgsql-general@arkaria.postgresql.org; Wed, 18 Jul 2018 13:19:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmM8-0004AN-Ex for pgsql-general@lists.postgresql.org; Wed, 18 Jul 2018 13:19:00 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffmM4-0005La-37 for pgsql-general@lists.postgresql.org; Wed, 18 Jul 2018 13:18:59 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id D46AF3F7; Wed, 18 Jul 2018 09:18:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 18 Jul 2018 09:18:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=xr+pLCYBNQ6HjFf+6OWLrQTiVJFr/ Mm5g5dGXxjLhaM=; b=rGBrmXgeCQE2/9VEpBlurpAInlAOKM4bCpry9iLA+UOcA H2fGroCyzM34/DsVB0Zn6ptMjaej/+PpkPYNc369Dj7hYCnUQnIkaHWa38agz/he oULSoO5kzBcfec/q95ZJmdcenfWthSCgvj4WJxR07EvKkY5hj2FxyQQXYp+X1BSs XXr/+JJkb6DAPOwaV3X8XcCOM1ZrFadDQ1h2bY/Wt7i2drGOOSNLSFd55fUm2CjJ lLYiifXkhm0TPCRZAGEfvOMRaF2iKoIQuO9ZyPuyMvcXDgYtxAQWPzv+5kEeN76d V8YTKHh7jnlFtizWCM1sbl/79Rid/9dnrBHMGeWNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=xr+pLC YBNQ6HjFf+6OWLrQTiVJFr/Mm5g5dGXxjLhaM=; b=LhcI88uOQsjPUkmYMzYc3C /NZO0N4xcPGIwpi7Hfmx51TuFDWneYUb/6kqXtrgWCzXYMBH9ccRDZWq3STbkY9g +v0gba3/ghnk+6jpvZaAAkRIfCODNTqRBorg0MwfxQqxl1OnC7xKnCnA1dTlCY0v lUgH9p0jJM3z3TkX9ppaE5Uc66MvMhC6Iuoidn64mC7UjTkuw0lvmtH2W2CdSM2X 7rmC4UK16py4J2lMBZHhEsp675UdxKqiC1PFqlxjJyKhdTMoMRvgDKmpVrvgIcGm efYVdrVCOxFdLru57uQ/n1yfZZMBJ1aoVG2kOW30yCxBMOBpBP4RKlSzESsanY9w == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 8C2AB1026C; Wed, 18 Jul 2018 09:18:53 -0400 (EDT) Subject: Re: Is it ok to run vacuum full verbose command for live database for the tables which has more dead tuples? To: Raghavendra Rao J S V , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <6ff5e1a7-32d3-0e84-93f5-20630b2ccdca@aklaver.com> Date: Wed, 18 Jul 2018 06:18:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/18/2018 02:13 AM, Raghavendra Rao J S V wrote: > We have thousands of tables. But out of those tables, around 20 to 40 > tables are always busy due to that those tables are bloating. Define bloating? > > In order to avoid this we are running a shell script which performs > vacuum full on the tables which has more than ten thousand dead tuples. Out of how many live tuples? > While running this we are stopping all application processors and > running vacuum full on the tables which has more dead tuples. > > 1. Is it ok to run *vacuum full verbose* command for live database for > the tables which has more dead tuples(greater than)? > 2. Does it cause any *adverse *effect? https://www.postgresql.org/docs/10/static/sql-vacuum.html "FULL Selects “full” vacuum, which can reclaim more space, but takes much longer and exclusively locks the table. This method also requires extra disk space, since it writes a new copy of the table and doesn't release the old copy until the operation is complete. Usually this should only be used when a significant amount of space needs to be reclaimed from within the table. " > > > Please clarify me. Thanks in advance. > > -- > Regards, > Raghavendra Rao J S V > -- Adrian Klaver adrian.klaver@aklaver.com