Skip site navigation (1) Skip section navigation (2)

Re: Vacuumdb error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Carl von Clausewitz <clausewitz45(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuumdb error
Date: 2011-04-14 16:46:15
Message-ID: 16734.1302799575@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Carl von Clausewitz <clausewitz45(at)gmail(dot)com> writes:
> Maintenance:
> #!/bin/sh
> date >> /var/log/postgresql_maintenance.log
> /usr/local/bin/reindexdb --all --username=cvc >>
> /var/log/postgresql_maintenance.log
> echo "Reindex done" >> /var/log/postgresql_maintenance.log
> /usr/local/bin/vacuumdb --all --full --analyze --username=cvc >>
> /var/log/postgresql_maintenance.log
> echo "Vacuum done" >> /var/log/postgresql_maintenance.log

Just FYI, the reindex step is 100% useless if you're going to do a
vacuum full afterwards.

Before 9.0 there was some value in doing vacuum full and then reindex,
but none whatsoever in the other ordering.  As of 9.0 there's just no
point at all in doing both.  VACUUM FULL rebuilds the indexes anyway.

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Carl von ClausewitzDate: 2011-04-14 16:52:17
Subject: Re: Vacuumdb error
Previous:From: Carl von ClausewitzDate: 2011-04-14 16:36:55
Subject: Re: Vacuumdb error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group