pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Perumal Raj <perucinci@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Recommendation to run vacuum FULL in parallel
Date: Wed, 03 Apr 2019 08:22:05 +0200
Message-ID: <9de455158b3a777b2ed6cbe25ff7fc2d4f3a8a9c.camel@cybertec.at> (raw)
In-Reply-To: <CALvqh4q3SnBAh+eFCmGVgcH7KH0eCeA2ttf4wU3OUwEWPFggyg@mail.gmail.com>
References: <CALvqh4q3SnBAh+eFCmGVgcH7KH0eCeA2ttf4wU3OUwEWPFggyg@mail.gmail.com>

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






view thread (17+ messages)  latest in thread

Message-ID: <9de455158b3a777b2ed6cbe25ff7fc2d4f3a8a9c.camel@cybertec.at>
Permalink:  ../9de455158b3a777b2ed6cbe25ff7fc2d4f3a8a9c.camel@cybertec.at/
Also on:    postgresql.org/message-id/9de455158b3a777b2ed6cbe25ff7fc2d4f3a8a9c.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, perucinci@gmail.com
  Subject: Re: Recommendation to run vacuum FULL in parallel
  In-Reply-To: <9de455158b3a777b2ed6cbe25ff7fc2d4f3a8a9c.camel@cybertec.at>
  References: <CALvqh4q3SnBAh+eFCmGVgcH7KH0eCeA2ttf4wU3OUwEWPFggyg@mail.gmail.com> <9de455158b3a777b2ed6cbe25ff7fc2d4f3a8a9c.camel@cybertec.at>

* 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