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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to