Re: Why need XLogReadBuffer have the paramter "init"? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why need XLogReadBuffer have the paramter "init"?
Date
Msg-id 15998.1176303488@sss.pgh.pa.us
Whole thread Raw
In response to Why need XLogReadBuffer have the paramter "init"?  ("Jacky Leng" <lengjianquan@163.com>)
List pgsql-hackers
"Jacky Leng" <lengjianquan@163.com> writes:
> Cann't we remove this param?

No.

> We can rewrite like this:
> 1.XLogReadBuffer:
>   * remove init;
>   * everytime we cann't read a block, just "log_invalid_page" it, and return
> InvalidBuffer;

Your proposal degrades the robustness of the system by turning non-error
cases into errors.  If the caller is able to rewrite the page fully, we
should not report an error when it's not available to read.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Vista/IPv6
Next
From: Andrew Dunstan
Date:
Subject: Re: Vista/IPv6