Re: [HACKERS] BlockNumber initialized to InvalidBuffer?

2012-07-13 Thread Markus Wanner
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

Re: [HACKERS] BlockNumber initialized to InvalidBuffer?

2012-07-13 Thread Markus Wanner
On 07/13/2012 11:33 AM, Markus Wanner wrote: As another minor improvement, it doesn't seem necessary to repeatedly set the rootBlkno. Sorry, my mail program delivered an older version of the patch, which didn't reflect that change. Here's what I intended to send. Regards Markus Wanner # #

Re: [HACKERS] BlockNumber initialized to InvalidBuffer?

2012-07-13 Thread Tom Lane
Markus Wanner mar...@bluegap.ch writes: On 07/13/2012 11:33 AM, Markus Wanner wrote: As another minor improvement, it doesn't seem necessary to repeatedly set the rootBlkno. Sorry, my mail program delivered an older version of the patch, which didn't reflect that change. Here's what I

[HACKERS] BlockNumber initialized to InvalidBuffer?

2012-07-10 Thread Markus Wanner
Hackers, I stumbled across an initialization of a BlockNumber with InvalidBuffer, which seems strange to me, as the values for invalid of the two types are different, see attached patch. In case the 'stack' argument passed to that function is not NULL, the variable in question gets overridden

Re: [HACKERS] BlockNumber initialized to InvalidBuffer?

2012-07-10 Thread Tom Lane
Markus Wanner mar...@bluegap.ch writes: I stumbled across an initialization of a BlockNumber with InvalidBuffer, which seems strange to me, as the values for invalid of the two types are different, see attached patch. That's certainly bogus ... In case the 'stack' argument passed to that