Re: Implement missing join selectivity estimation for range types

From: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
To: Haibo Yan <tristan(dot)yim(at)gmail(dot)com>, SCHOEMANS Maxime <maxime(dot)schoemans(at)ulb(dot)be>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Damir Belyalov <dam(dot)bel07(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, SAKR Mahmoud <mahmoud(dot)sakr(at)ulb(dot)be>, Diogo Repas <diogo(dot)repas(at)gmail(dot)com>
Subject: Re: Implement missing join selectivity estimation for range types
Date: 2026-09-18 20:18:21
Message-ID: 6929b807-32e9-4e80-b3d3-1f7823880d60@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/24/2026 1:44 PM, Haibo Yan wrote:
> On Thu, Apr 23, 2026 at 5:32 AM SCHOEMANS Maxime <maxime(dot)schoemans(at)ulb(dot)be>
> wrote:
>
>> Hi Haibo,
>>
>> Thanks for creating the CommitFest entry. Could you add Diogo Repas,
>> Zhicheng Luo, and Mahmoud Sakr as authors as well? They wrote the
>> original patch and the underlying algorithm. The earlier CF entry is
>> at https://commitfest.postgresql.org/patch/3821/ for reference.
>>
>> Of course — I’ve added Diogo Repas, Zhicheng Luo, and Mahmoud Sakr as
> authors as we
>
>> Regards,
>> Maxime
>>
> Thanks for the reference.
>
> Best regards,
> Haibo

One thing that might be a problem is that rangejoinsel and
multirangejoinsel (0002) look like they use the bounds histogram without
the statistic_proc_security_check() that calc_hist_selectivity does just
above. If I follow it correctly, that runs the cmp/subdiff over another
role's histogram at plan time, before the permission check, which I
believe is what CVE-2017-7484 guarded against.

--
Bryan Green
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Reiß 2026-09-18 20:51:20 Re: [Patch] New pg_stat_tablespace view
Previous Message Alexander Korotkov 2026-09-18 20:14:16 Re: Reject WAIT FOR earlier in transaction-snapshot mode