Re: detection of VACUUM in progress

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bohdan Linda <bohdan(dot)linda(at)seznam(dot)cz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: detection of VACUUM in progress
Date: 2005-08-30 15:53:56
Message-ID: 22212.1125417236@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bohdan Linda <bohdan(dot)linda(at)seznam(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Clodoaldo Pinto 2005-08-30 16:00:18 Re: update functions locking tables
Previous Message Bohdan Linda 2005-08-30 15:35:13 detection of VACUUM in progress