Re: LWLock contention: I think I understand the problem

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: LWLock contention: I think I understand the problem
Дата
Msg-id 200201231910.g0NJARm29656@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: LWLock contention: I think I understand the problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: LWLock contention: I think I understand the problem
Список pgsql-hackers
Tom Lane wrote:
> Hannu Krosing <hannu@tm.ee> writes:
> > Was it not the case that instead of locking whole tables the new 
> > vacuum locks only one page at a time. If it can't lock that page it 
> > just moves to next one instead of waiting for other backend to release 
> > its lock.
> 
> No, it just waits till it can get the page lock.
> 
> The only conditional part of the new vacuum algorithm is truncation of
> the relation file (releasing empty end pages back to the OS).  That
> requires exclusive lock on the relation, which it will not be able to
> get if there are any other users of the relation.  In that case it
> forgets about truncation and just leaves the empty pages as free space.

If we have one page with data, and 100 empty pages, and another page
with data on the end, will VACUUM shrink that to two pages if no one is
accessing the table, or does it do _only_ intra-page moves.

--  Bruce Momjian                        |  http://candle.pha.pa.us 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Savepoints
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Schemas vs. PostQUEL: resolving qualified identifiers