Re: Avoiding unnecessary reads in recovery - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Avoiding unnecessary reads in recovery
Date
Msg-id 46332004.2080207@enterprisedb.com
Whole thread Raw
In response to Re: Avoiding unnecessary reads in recovery  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
> On Fri, 2007-04-27 at 12:22 +0100, Heikki Linnakangas wrote:
>> Patch implementing that attached. I named the function "ReadOrZeroBuffer".
> 
> We already have an API quirk similar to this: relation extension. It
> seems strange to have two different kinds of special case API that are
> used alongside each other in XLogReadBuffer()
> 
> Currently if we extend by a block we say
>     buffer = ReadBuffer(reln, P_NEW);
> 
> Why not just add another option, so where you use ReadOrZeroBuffer we
> just say
>     buffer = ReadBuffer(reln, P_INIT);

Because ReadOrZeroBuffer needs the block number as an argument.

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


pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Avoiding unnecessary reads in recovery
Next
From: Heikki Linnakangas
Date:
Subject: Re: Avoiding unnecessary reads in recovery