Re: Avoiding unnecessary reads in recovery

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Avoiding unnecessary reads in recovery
Дата
Msg-id 4631F8C0.5050008@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Avoiding unnecessary reads in recovery  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Avoiding unnecessary reads in recovery  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera wrote:
> Heikki Linnakangas wrote:
> 
>> What we could have is the semantics of "Return a buffer, with either 
>> correct contents or completely zeroed out". It would act just like 
>> ReadBuffer if the buffer was already in memory, and zero out the page 
>> otherwise. That's a bit strange semantics to have, but is simple to 
>> implement and works for the use-cases we've been talking about.
> 
> Huh, why does that work in the case where the recovery code reads a
> page, then evicts it because of memory pressure, and later needs to read
> it again?

I don't understand the problem. You only use ReadOrZeroBuffer when 
you're going to replace the contents entirely, and don't care about the 
old contents. If you want to read something in, you use ReadBuffer.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Avoiding unnecessary reads in recovery
Следующее
От: "rancpine cui"
Дата:
Сообщение: Fwd: How does the partitioned lock manager works?