Re: Add red-black tree missing comparison searches - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Add red-black tree missing comparison searches
Date
Msg-id CAPpHfdur38rJhzWPw52DWrtS5QFxMBZjDWrLs1P_uPb0MjuV7A@mail.gmail.com
Whole thread Raw
In response to Fwd: Add red-black tree missing comparison searches  (Steve Chavez <steve@supabase.io>)
Responses Re: Add red-black tree missing comparison searches
List pgsql-hackers
On Thu, Jul 7, 2022 at 2:16 AM Steve Chavez <steve@supabase.io> wrote:
> Thanks Alexander!
>
> wrt to the new patch. I think the following comment is misleading since keyDeleted can be true or false:
>
> + /* switch equal_match to false so we only find greater matches now */
> + node = (IntRBTreeNode *) rbt_find_great(tree, (RBTNode *) &searchNode,
> + keyDeleted);
>
> Maybe it should be the same used for searching lesser keys:
>
> + /*
> + * Find the next key.  If the current key is deleted, we can pass
> + * equal_match == true and still find the next one.
> + */

Thank you for catching this.
The revised version of patch is attached!

------
Regards,
Alexander Korotkov

Attachment

pgsql-hackers by date:

Previous
From: "wangw.fnst@fujitsu.com"
Date:
Subject: RE: Perform streaming logical transactions by background workers and parallel apply
Next
From: Joe Conway
Date:
Subject: Re: tuplesort Generation memory contexts don't play nicely with index builds