Re: LWLock contention: I think I understand the problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LWLock contention: I think I understand the problem
Дата
Msg-id 9390.1010421575@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: LWLock contention: I think I understand the problem  (Hannu Krosing <hannu@tm.ee>)
Ответы Re: LWLock contention: I think I understand the problem
Список pgsql-hackers
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.
        regards, tom lane


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

Предыдущее
От: Holger Krug
Дата:
Сообщение: Re: ON ERROR triggers
Следующее
От: Holger Krug
Дата:
Сообщение: Why MemoryContextSwitch in ExecRelCheck ?