Re: Concurrent VACUUM and ANALYZE

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Concurrent VACUUM and ANALYZE
Дата
Msg-id 20080721221553.GK5842@alvh.no-ip.org
обсуждение исходный текст
Ответ на Concurrent VACUUM and ANALYZE  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Ответы Re: Concurrent VACUUM and ANALYZE  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Список pgsql-hackers
Jonah H. Harris escribió:
> Currently, one cannot perform a concurrent VACUUM and ANALYZE.  This
> is a significant problem for tables which are not only large and have
> designated cost-delays, but which are also heavily inserted into and
> deleted from.  After performing a quick cursory investigation on this,
> it doesn't appear to be difficult to change.  Other than the
> ShareUpdateExclusiveLock, is there anything technically preventing us
> from performing both concurrently?

This means that VACUUM ANALYZE must grab both locks ... is there a
gotcha here?

The main problem I see with this idea is that the dead and total tuple
count computed by ANALYZE would be immediately out of date, and if it
happens to finish after VACUUM then it'll overwrite the values the
latter just wrote, which are more correct.  Not sure how serious a
problem this is.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Load spikes on 8.1.11
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Load spikes on 8.1.11