Skip site navigation (1) Skip section navigation (2)

Re: Avoiding unnecessary reads in recovery

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: alvherre(at)commandprompt(dot)com
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Avoiding unnecessary reads in recovery
Date: 2007-04-27 13:21:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

In response to


pgsql-hackers by date

Next:From: Chris BrowneDate: 2007-04-27 13:30:27
Subject: Re: Modifying TOAST thresholds
Previous:From: Alvaro HerreraDate: 2007-04-27 13:18:08
Subject: Re: Vacuum-full very slow

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group