Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition
Date
Msg-id CAMbWs481UoOxHyZGih-VhhC5bOQCpVd_KLXPtBAMRg7gD50+2w@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition  (tender wang <tndrwang@gmail.com>)
Responses Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition
Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition
List pgsql-bugs

On Wed, Dec 27, 2023 at 5:08 PM tender wang <tndrwang@gmail.com> wrote:
Alexander Lakhin <exclusion@gmail.com> 于2023年12月27日周三 15:00写道:
I wonder, if "buf_state &= BM_VALID" is a typo here, maybe it supposed to be
"buf_state &= ~BM_VALID" as in ExtendBufferedRelShared()...
 
Yeah, that's true.  I analyze this issue again, and I think the root cause is the " buf_state &= BM_VALID" .

Nice catch.  I believe the intention is to clear the BM_VALID bit.

By the way, I wonder if it would be worthwhile to define new macros for
bit operations such as set_bit, clear_bit, test_bit, and so on, so that
we can avoid such typos in the future.

Thanks
Richard

pgsql-bugs by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: BUG #18260: Unexpected error: "negative bitmapset member not allowed" triggered by multiple JOIN
Next
From: Richard Guo
Date:
Subject: Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries