Re: autovacuum truncate exclusive lock round two
От | Alvaro Herrera |
---|---|
Тема | Re: autovacuum truncate exclusive lock round two |
Дата | |
Msg-id | 20121025162415.GF6442@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: autovacuum truncate exclusive lock round two (Jan Wieck <JanWieck@Yahoo.com>) |
Ответы |
Re: autovacuum truncate exclusive lock round two
|
Список | pgsql-hackers |
Jan Wieck wrote: > In the original code, the maximum delay that autovacuum can cause by > holding the exclusive lock is one deadlock_timeout (default 1s). It > would appear reasonable to me to use max(deadlock_timeout/10,10ms) > as the interval to check for a conflicting lock request. For another > transaction that needs to access the table this is 10 times faster > than it is now and still guarantees that autovacuum will make some > progress with the truncate. So you would be calling GetCurrentTimestamp() continuously? Since you mentioned adding a vacuum delay point I wonder if it would make sense to test for lockers each time it would consider going to sleep, instead. (One hazard to keep in mind is the case where no vacuum delay is configured.) -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: