Re: Vacuum now uses AccessShareLock for analyze

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Vacuum now uses AccessShareLock for analyze
Дата
Msg-id 200005291654.MAA13690@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Vacuum now uses AccessShareLock for analyze  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
> its what I suspected, but my point was that if we did the ANALYZE for the
> relation right after the VACUUM for it, there would be a period of time
> where readers could come in and process ... think of it as a 'breather'
> before the next VACUUM starts, vs just jumping into the next ...
> 
> Overall time for doing the vacuum shouldn't be any longer, but it would
> give gaps where readers could get in and out ... we're a relational
> database, so I imagine ppl are doing JOINs ... if RelationA is locked
> while ReaderA is trying to doign a JOIN between RA and RB, ReaderA is
> gonna be screwed ... if we did a quick ANALZE between RelationA and
> RelationB, then ReaderA would have a chance to do its processing while the
> ANALYZE is running, instead of having to wait for both RelationA and
> RelationB to be finished ...

Good point.  Because we are only doing one table at a time, they could
get in and do something, but they could also get part-way in and have
another table locked, and since we are only locking one at a time, it
seemed better to get it all done first.  Comments?

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Additional system indexes
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Proposal for enhancements of privilege system