Re: Design notes for BufMgrLock rewrite

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Design notes for BufMgrLock rewrite
Дата
Msg-id 42145250.1050202@archonet.com
обсуждение исходный текст
Ответ на Re: Design notes for BufMgrLock rewrite  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> "Jim C. Nasby" <decibel@decibel.org> writes:
> 
>>The advantage of using a counter instead of a simple active
>>bit is that buffers that are (or have been) used heavily will be able to
>>go through several sweeps of the clock before being freed. Infrequently
>>used buffers (such as those from a vacuum or seq.  scan), would get
>>marked as inactive the first time they were hit by the clock hand.

> What I'm envisioning is that pinning (actually unpinning) a buffer
> increments the counter (up to some limit), and the clock sweep
> decrements it (down to zero), and only buffers with count zero are taken
> by the sweep for recycling.

Would there be any value in incrementing by 2 for index accesses and 1 
for seq-scans/vacuums? Actually, it should probably be a ratio based on 
random_page_cost shouldn't it?

--   Richard Huxton  Archonet Ltd


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

Предыдущее
От: Dennis Bjorklund
Дата:
Сообщение: Re: Help me recovering data
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Urgent problem: Unicode characters greater than or