Re: BlockNumber initialized to InvalidBuffer?

Markus Wanner <markus@bluegap.ch>

From: Markus Wanner <markus@bluegap.ch>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Teodor Sigaev <teodor@sigaev.ru>, Oleg Bartunov <oleg@sai.msu.su>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-07-13T09:33:51Z
Lists: pgsql-hackers

Attachments

On 07/11/2012 05:45 AM, Tom Lane wrote:
> I'm also inclined to think that the "while (stack)" coding of the rest
> of it is wrong, misleading, or both, on precisely the same grounds: if
> that loop ever did fall out at the test, the function would have failed
> to honor its contract.  The only correct exit points are the "return"s
> in the middle.

I came to the same conclusion, yes. Looks like the additional asserts in
the attached patch all hold true.

As another minor improvement, it doesn't seem necessary to repeatedly
set the rootBlkno.

Regards

Markus Wanner