Re: Stopping vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wbohl(at)deepdata(dot)com
Cc: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Stopping vacuum
Date: 2004-06-30 02:41:47
Message-ID: 2786.1088563307@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Werner Bohl <wbohl(at)deepdata(dot)com> writes:
> We have a very big db that was not vacuumed for a long time. We started
> vacuum 3 days ago and it has not finished yet. There are some urgent
> processes that have to be run against the db.

> Is it safe to kill vacuum? It was started with 'vacuum full analyze'
> Is there anyway to speed it up at next start?

It is safe in the sense that your database won't be corrupted (were it
not safe, vacuum would be too dangerous to use at all --- think of power
failures for instance).

However, whatever work vacuum has done on the current table will be lost
and need to be done over when you run it again. If the thing is stuck
on a particularly large and messy table then killing it could well be
counterproductive --- you might just be buying yourself an even longer
vacuum run next time.

I'd suggest identifying exactly which table it is currently working on
before you kill it. Then look into alternate methods of compacting that
table. It's entirely possible that CLUSTER would be a faster cleanup
method than VACUUM FULL.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-06-30 03:37:22 Re: How to list what queries are running in postgres?
Previous Message 周仁军 2004-06-30 02:05:15 unsubscribe