lazy vacuum sleeps with exclusive lock on table
| От | Alvaro Herrera |
|---|---|
| Тема | lazy vacuum sleeps with exclusive lock on table |
| Дата | |
| Msg-id | 20070628211654.GD22200@alvh.no-ip.org обсуждение исходный текст |
| Ответы |
Re: lazy vacuum sleeps with exclusive lock on table
|
| Список | pgsql-hackers |
Hi, 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 life. 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
В списке pgsql-hackers по дате отправления: