Re: detection of VACUUM in progress - Mailing list pgsql-general

From Tom Lane
Subject Re: detection of VACUUM in progress
Date
Msg-id 22212.1125417236@sss.pgh.pa.us
Whole thread Raw
In response to detection of VACUUM in progress  (Bohdan Linda <bohdan.linda@seznam.cz>)
List pgsql-general
Bohdan Linda <bohdan.linda@seznam.cz> writes:
> Is there any way how to detect running command VACUUM by reading pg_* tables?

> The idea is to detectect when table is not accessible due maintainance.

Um, ordinary VACUUM doesn't render the table "not accessible".  If
you're using VACUUM FULL, maybe the right answer is to not do that.

But to answer your question, you could look in pg_locks to see if
there's an exclusive lock on the table.

            regards, tom lane

pgsql-general by date:

Previous
From: "Hossein S. Attar"
Date:
Subject: Re: postgres optimizer
Next
From: Clodoaldo Pinto
Date:
Subject: Re: update functions locking tables