Re: Why need XLogReadBuffer have the paramter "init"?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jacky Leng" <lengjianquan(at)163(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why need XLogReadBuffer have the paramter "init"?
Date: 2007-04-11 14:58:08
Message-ID: 15998.1176303488@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jacky Leng" <lengjianquan(at)163(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-04-11 15:06:54 Re: Vista/IPv6
Previous Message Peter Eisentraut 2007-04-11 14:57:36 Re: Vista/IPv6