I noticed that lazy vacuum acquires an exclusive lock at the end, to be
able to truncate the table.  This is not a surprise.  If it cannot
acquire the lock, it simply skips truncating the table and goes on with

However, what's problematic is that if a non-zero cost delay has been
set, it will happily take naps while determining what to truncate :-(
This seems a bad idea.  It also may explain why some people is seeing
autovacuum blocking other processes.  It also readily explains why this
is so when there are no non-granted locks for autovacuum.

Comments?  I think we should remove the sleep in the truncate phase.

Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to