Re: VACUUM and other maintenance work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christian Hofmann" <christian(dot)hofmann(at)gmx(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: VACUUM and other maintenance work
Date: 2005-04-01 15:37:29
Message-ID: 6641.1112369849@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Christian Hofmann" <christian(dot)hofmann(at)gmx(dot)de> writes:
> 2. Connecting, maybe by a cron job, to the database and submitting the query
> "VACUUM ANALYZE" will prevent me from losing data from not vacuuming. Is
> that correct?

You have to do this in each connectable database (yes, you can ignore
template0). Most people prefer to use the vacuumdb script rather than
invent their own.

Alternatively you can use the pg_autovacuum daemon.

There are details about maintenance tasks in the manual:
http://www.postgresql.org/docs/8.0/static/maintenance.html
(adjust URL to match your PG version)

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Rob Anderson 2005-04-01 16:26:29 Trying to group on date parts
Previous Message Tom Lane 2005-04-01 15:11:29 Re: Handling Time