pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Raghavendra Rao J S V <raghavendrajsv@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Is it ok to run vacuum full verbose command for live database for the tables which has more dead tuples?
Date: Wed, 18 Jul 2018 06:18:52 -0700
Message-ID: <6ff5e1a7-32d3-0e84-93f5-20630b2ccdca@aklaver.com> (raw)
In-Reply-To: <CAEHH7R7f9oQauDNLsOZ4BO_Yi7icP_n6SxChQj69ROsX0FuGOg@mail.gmail.com>
References: <CAEHH7R7f9oQauDNLsOZ4BO_Yi7icP_n6SxChQj69ROsX0FuGOg@mail.gmail.com>

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




view thread (5+ messages)  latest in thread

Message-ID: <6ff5e1a7-32d3-0e84-93f5-20630b2ccdca@aklaver.com>
Permalink:  ../6ff5e1a7-32d3-0e84-93f5-20630b2ccdca@aklaver.com/
Also on:    postgresql.org/message-id/6ff5e1a7-32d3-0e84-93f5-20630b2ccdca@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, raghavendrajsv@gmail.com, pgsql-general@lists.postgresql.org
  Subject: Re: Is it ok to run vacuum full verbose command for live database for the tables which has more dead tuples?
  In-Reply-To: <6ff5e1a7-32d3-0e84-93f5-20630b2ccdca@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox