From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Steve Chavez <steve(at)supabase(dot)io> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add red-black tree missing comparison searches |
Date: | 2022-07-07 10:43:55 |
Message-ID: | CAPpHfdur38rJhzWPw52DWrtS5QFxMBZjDWrLs1P_uPb0MjuV7A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 7, 2022 at 2:16 AM Steve Chavez <steve(at)supabase(dot)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 | Content-Type | Size |
---|---|---|
0001-Use-C99-designator-in-the-rbtree-sentinel-definit-v3.patch | application/octet-stream | 908 bytes |
0002-Add-missing-inequality-searches-to-rbtree-v3.patch | application/octet-stream | 7.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2022-07-07 10:46:12 | Re: tuplesort Generation memory contexts don't play nicely with index builds |
Previous Message | wangw.fnst@fujitsu.com | 2022-07-07 10:20:45 | RE: Perform streaming logical transactions by background workers and parallel apply |