Re: Wrong Assert in PageIndexMultiDelete?

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Anastasia Lubennikova <lubennikovaav(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Wrong Assert in PageIndexMultiDelete?
Date: 2015-05-19 16:20:40
Message-ID: 555B62D8.4070306@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/19/2015 07:15 PM, Tom Lane wrote:
> Anastasia Lubennikova <lubennikovaav(at)gmail(dot)com> writes:
>> I am trying to create new index access method.
>> And I found strange Assert in PageIndexMultiDelete
>> <http://doxygen.postgresql.org/bufpage_8c_source.html#l00791> function.
>
>> Assert
>> <http://doxygen.postgresql.org/c_8h.html#a706ac5b1a53bd04067f81924b92cb9f6>(nitems
>> < MaxIndexTuplesPerPage
>> <http://doxygen.postgresql.org/itup_8h.html#adb7c94e95ce112eb47d71f7797604ddb>
>> );
>
>> Is '<' sign is correct? I thougt it should be '<='.
>> Is it a bug or just my misunderstanding?
>
> Hm, I think it's a bug. It's probably not very significant because
> MaxIndexTuplesPerPage is an overestimate (it doesn't account for index
> special space), but it's wrong AFAICS.
>
> That Assert hasn't been there very long, either --- seems to have been
> added in 877b0887. Heikki, did you have some specific reason for writing
> it like that?

No, it looks like a bug to me as well. Will fix...

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-05-19 16:21:26 Re: errmsg() clobbers errno
Previous Message Tom Lane 2015-05-19 16:15:58 Re: Wrong Assert in PageIndexMultiDelete?