Tom Lane <tgl@sss.pgh.pa.us> writes:
> Josh Berkus <josh@agliodbs.com> writes:
> > BTW, do we have any provisions to avoid overlapping vacuums? That is, to
> > prevent a second vacuum on a table if an earlier one is still running?
>
> Yes, VACUUM takes a lock that prevents another VACUUM on the same table.
The second vacuum waits for the lock to become available. If the situation got
really bad there could end up being a growing queue of vacuums waiting.
I'm not sure how likely this is as the subsequent vacuums appear to finish
quite quickly though. But then the largest table I have to play with fits
entirely in memory.
--
greg