Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7f37-00000000Zl7-1c10 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Sep 2026 20:19:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7f36-00000003NJ8-2oQG for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Sep 2026 20:19:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7f36-00000003NJ0-1ail for pgsql-hackers@lists.postgresql.org; Fri, 18 Sep 2026 20:19:08 +0000 Received: from mail-oo2-x1b.google.com ([2607:f8b0:4864:31::1b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x7f34-000000005Y7-0fcz for pgsql-hackers@lists.postgresql.org; Fri, 18 Sep 2026 20:19:07 +0000 Received: by mail-oo2-x1b.google.com with SMTP id 006d021491bc7-6c72bd8a02fso725041eaf.0 for ; Fri, 18 Sep 2026 13:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789762746; x=1790367546; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=YvA/wGYc4FhEIu0P0+0pViV2X7aPXY9lIeZkwInhhhc=; b=OAw7hRxr6Oj9oNigmx/C7Ed+NKJqj8Mrc5M7Eh4PSByf/ofG/TcViOUJvyhhnBXeS5 EtnejlX/eauR1tUkTIdWw4kM8QI/29Oj6NGlaP8/6h08GAWBAZsX8o0ECcQROTQdaDkC TBJK4yxoLRT/PqZpuxBi6l8CzGL4KYyUydatmx3S3E0LQ20q1F8pN2gzX13fAiJPV1VR F3IN5a18BsL0F8cuicvVF4XxRjYhFhB33GxNuWs8NyjvPJdwbjkK8gWTFpZpIjoOkROM bFUeU5O2D/cCiF6gN0uKUkcJwZiTKBms6gl7hgHjJQAIL5elt3eh7Z9pKr4srtInA3yX vFIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789762746; x=1790367546; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YvA/wGYc4FhEIu0P0+0pViV2X7aPXY9lIeZkwInhhhc=; b=Mlh2YwST77xV9ghs8hR8dLBzDJQWRQTeInDpSO2gDqkuF48wcC0Kvwt15ddz07rA+e 5O4lapY0qvrPvwjXxkmGnt6je+w0msZp+iLQ5KYx4HnMrCNYMC4DgSWfAKMUMfIrpBwg 0unmwrbnW/uF8eeK0AMGr21NGmLgfxje+7WpDu20Q8KNDlEBq7zWyfB5Mxtikm9nFVQH EmMcdFxLbYNFq9OF8CWLG5xklRQvol6xULUYACxhNsicQMrMa3497s0RG7TbcJHlWZ5D /6vt7KtMjWoxdzFIwrgct973YUIkFZvHdHhx7UFwenRe8SbTjPtHPExpGCa2ev/6RfUv cM8Q== X-Forwarded-Encrypted: i=1; AKwUvByARfxzc63zQ7rl5UAxCXg8uT4AZWebuzuv3C/j5rT4HqGZFWdjfb8A7rVP5jufhxSnsu9bIMqHN9cdk8a6@lists.postgresql.org X-Gm-Message-State: AFuF++mtM2JyLtNcBEL8++J90R7+NJI/CC+zRXYM5Q1f3c0SpJoGL9R+ pG6NB7pUV1Ji8149LEgg+l1mCK5xTSKMGY1V91yHukZ89+Ctlp02p4N/ X-Gm-Gg: AYBFou1F1hdnruR79wcm8MwJCATl4dA9n9PNZu56NWDxYx6veIy85vjR1oxP6qHRS/i A1OAL2iz2EcxIW/CkcBAnfe3vRH7thwCkzG5JYwEzTjPWtpdR9B9sGjkVb81VqtWxg0uGeuj12y frWmvt/IbcIPsjepjl72b2iuBl66K7JlV/gbn8acJuUjXmLwz9zF3F2k6cv9MDCMrzMM2iuWDV2 v1vuHOMu3I9+QOqtUpZNqOVe5/WH+7k0Ugxvhqploi7B6IKjlhahGXNHB0gwSHFc5Yh7//r1Jxf piiFd9zXIL3eSOW5yNdFKpvTEDM2ItpMOigruMuFqmUee1Ih4FWsfTdq3TTdinO/roTgieKrdfP X9GHJhR2r+i0nM7sC7+wr+4ZRSowFmNku3cViMm1BwYP3acF6a4AByR+RVU6wjaM3w0PWbXxAmf cm1dW8NHHLXf+fNec/LRzwcbYh8e3lpzYOt5ezbWlLZzZLY2syStXa2HlqYYznn8CScEV2CcdyA +6sxKT4I2gnsH+/V1/x8iZKH+Yx+YkvCRRWLY2Gwhx6TQ8a8FG4UvtsAgPnU6EsKpDJML69IZw9 z+/ut5F3NQaiXbolAA== X-Received: by 2002:a05:6820:3385:10b0:6cd:3fdc:6002 with SMTP id 006d021491bc7-6cd3fecf481mr513010eaf.83.1789762746004; Fri, 18 Sep 2026 13:19:06 -0700 (PDT) Received: from ?IPV6:2603:8082:2b40:1f:b42b:87df:b323:cf7a? ([2603:8082:2b40:1f:b42b:87df:b323:cf7a]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-8107b8231a4sm485990a34.3.2026.09.18.13.19.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2026 13:19:05 -0700 (PDT) Message-ID: <6929b807-32e9-4e80-b3d3-1f7823880d60@gmail.com> Date: Fri, 18 Sep 2026 15:18:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Implement missing join selectivity estimation for range types To: Haibo Yan , SCHOEMANS Maxime Cc: vignesh C , Tom Lane , Damir Belyalov , jian he , PostgreSQL Hackers , SAKR Mahmoud , Diogo Repas References: Content-Language: en-US From: Bryan Green In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/24/2026 1:44 PM, Haibo Yan wrote: > On Thu, Apr 23, 2026 at 5:32 AM SCHOEMANS Maxime > 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