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

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: tender wang <tndrwang(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition
Date: 2023-12-28 06:36:46
Message-ID: CAMbWs481UoOxHyZGih-VhhC5bOQCpVd_KLXPtBAMRg7gD50+2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 27, 2023 at 5:08 PM tender wang <tndrwang(at)gmail(dot)com> wrote:

> Alexander Lakhin <exclusion(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2023-12-28 11:01:47 Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries
Previous Message Andrei Lepikhov 2023-12-28 04:30:42 Re: BUG #18260: Unexpected error: "negative bitmapset member not allowed" triggered by multiple JOIN