Re: VACUUM query - Mailing list pgsql-general

From Tom Lane
Subject Re: VACUUM query
Date
Msg-id 10737.1015521104@sss.pgh.pa.us
Whole thread Raw
In response to VACUUM query  ("news.apexsc.com" <lance@companywatch.co.uk>)
List pgsql-general
"news.apexsc.com" <lance@companywatch.co.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

pgsql-general by date:

Previous
From: "Michael Ben-David"
Date:
Subject: missing greatbridge / database session monitor
Next
From: e_arizon_benito@yahoo.com (Enrique Arizón Benito)
Date:
Subject: Modifying text data?