AFAIK, ReadBuffer() will elog on error, so callers can assume that the
buffer it returns is valid. The vast majority of ReadBuffer() call sites
make this assumption, but some went to the trouble of checking that the
returned buffer was valid and elog'ing if it was not. I've removed the
error checking from the latter since it is dead code.
I thought about adding an assertion (or even a precautionary
elog(ERROR)) to ReadBuffer to verify that the returned buffer is indeed
valid, but I didn't end up doing it. Feel free to raise your hand if you
think this is a good idea.
Barring any objections, I'll apply the attached patch to HEAD tomorrow.
pgsql-patches by date
|Next:||From: Neil Conway||Date: 2004-11-13 08:45:36|
|Subject: Re: PITR docs enhancements|
|Previous:||From: Robert Treat||Date: 2004-11-13 05:51:37|
|Subject: Give the TODO list a little more verbose explanation|