Re: VACUUM query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "news(dot)apexsc(dot)com" <lance(at)companywatch(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: VACUUM query
Date: 2002-03-07 17:11:44
Message-ID: 10737.1015521104@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"news.apexsc.com" <lance(at)companywatch(dot)co(dot)uk> writes:
> System: Linux 6.2; Postgresql 7.1.3
> can anyone tell me how to:
> 1. safely abort a VACUUM once it has started?
> 2. safely abort a scheduled vacuumdb once it has started?

In general, you cancel a VACUUM the same way as any other query:
control-C if interactively working in psql, or PQrequestCancel()
in a custom application, or send SIGINT to the individual backend
if you are an admin watching something go nuts.

In 7.1.* there is a known bug that aborting VACUUM partway through
vacuuming a TOAST table may leave things in a bad state. (Actually
there is nothing wrong with the table, but the TOAST code will get
confused because it doesn't check tuple status correctly. Re-vacuuming
will fix it, if you chance to get bit.) So I don't really recommend
doing this on a routine basis, until you update to 7.2.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Webber 2002-03-07 17:15:52 Re: [ODBC] ODBC from win2k to postgres on Linux HELL
Previous Message Tom Lane 2002-03-07 17:04:36 Re: What are functional indices good for?