"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