Bohdan Linda <bohdan.linda@xxxxxxxxx> 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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings