Re: Vacuum now uses AccessShareLock for analyze
От | Bruce Momjian |
---|---|
Тема | Re: Vacuum now uses AccessShareLock for analyze |
Дата | |
Msg-id | 200005291613.MAA12883@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Vacuum now uses AccessShareLock for analyze (The Hermit Hacker <scrappy@hub.org>) |
Ответы |
Re: Vacuum now uses AccessShareLock for analyze
|
Список | pgsql-hackers |
> On Mon, 29 May 2000, Bruce Momjian wrote: > > > I have changed vacuum so analyze now uses AccessShareLock. (Is this the > > proper lock for analyze?) > > > > The code will now vacuum all requested relations. It will then analyze > > each relation. This way, all the exclusive vacuum work is done first, > > then analyze can continue with shared locks. > > hrmmm, here's a thought ... why not vacuum->analyze each relation in > order? the 'exclusive lock' will prevent anyone from reading, so do a > relation, release the lock to analyze that relation and let ppl access the > database ... then do the next ... instead of doing an exclusive lock for > the duration of the whole database ... No, each table is locked one at a time. We do all the single-table locks first so the rest is all shared access. Does that make sense? -- 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 по дате отправления: