Re: BUG #19007: Planner fails to choose partial index with spurious 'not null' - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #19007: Planner fails to choose partial index with spurious 'not null'
Date
Msg-id CAMbWs48t5NDKQMo=ROpgAgx6emUjd6r0zscRmm_JzRLSssC-YA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #19007: Planner fails to choose partial index with spurious 'not null'  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-bugs
On Fri, Sep 26, 2025 at 6:20 PM Richard Guo <guofenglinux@gmail.com> wrote:
> Here is an updated version of the patch.  In the commit message, I've
> explained why I think the additional call to eval_const_expressions is
> not a performance concern.  I've also added a test case to validate
> that NullTest quals in index expressions can now be reduced.
>
> One concern I have is that this fix can only be applied to master;
> there's no way to backpatch it to v17 or v18.  This means that the
> issue won't exist in v16 or earlier, nor in v19 and later, but it will
> persist in v17 and v18.  I have no idea what we should do for v17 and
> v18.

I've pushed this fix to master.  Still no idea what to do for v17 and
v18.

- Richard



pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: GROUP BY ROLLUP queries on views trigger full table scans (index usage not optimized)
Next
From: David Rowley
Date:
Subject: Re: BUG #19332: Sudden 330x performance degradation of SELECT amid INSERTs