pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MirrorX <mirrorx@gmail.com>
To: pgsql-admin@postgresql.org
Subject: dump/restore vs vacuum full vs cluster
Date: Tue, 6 Sep 2011 14:06:08 -0700 (PDT)
Message-ID: <1315343168569-4776084.post@n5.nabble.com> (raw)

hello to all

i am stuck in the following situation. i have a table which is 500GB. due to
some deleted rows the actual size is about 350-400GB and i would like to
reclaim that disk space since from now on this table will remain at this
level (350-400GB). the system is in production but the specific table
doesn't affect a lot of procedures on the server so it would be ok to do
this maintenance 'online'. this table also has 2 indexes. one for its
primary key and one for another column, about 100GB each. as i understand my
options are:

1) dump the data of the table, truncate the table, restore it (what happens
to the indexes in this case?)
2)vacuum full and then reindex
3)cluster (based on the 2nd index)

what would you suggest if the most important factor is to minimize the total
time for this procedure?and, is there is any other option except the
mentioned above? thx in advance





--
View this message in context: http://postgresql.1045698.n5.nabble.com/dump-restore-vs-vacuum-full-vs-cluster-tp4776084p4776084.htm...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.



view thread (2+ messages)  latest in thread

Message-ID: <1315343168569-4776084.post@n5.nabble.com>
Permalink:  ../1315343168569-4776084.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1315343168569-4776084.post@n5.nabble.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-admin@postgresql.org
  Cc: mirrorx@gmail.com
  Subject: Re: dump/restore vs vacuum full vs cluster
  In-Reply-To: <1315343168569-4776084.post@n5.nabble.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