Re: Redundant qualifier elimination

From: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Denis Smirnov <darthunix(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Redundant qualifier elimination
Date: 2026-08-14 16:39:05
Message-ID: 9d1e83fe-0742-40c1-aa77-695a337be34e@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14/08/26 13:27, Tom Lane wrote:
> Denis Smirnov <darthunix(at)gmail(dot)com> writes:
>> So I think:
>
>> 1. The patch needs a VOLATILE check and planning-time tests.
>> 2. It fixes the selectivity estimate but does not fix the JIT regression.
>> 3. The main problem is the JIT cost decision: it uses total plan cost but does
>> not account for the number or size of generated JIT functions.
>
> For the record, I do not think we should accept this patch, even
> if the problems you mention get fixed. It would impose nontrivial
> costs on every query --- roughly O(N^2) in the number of restriction
> clauses --- in order to fix badly-written queries, and that is not
> a tradeoff I like. We could doubtless improve the cost by expending
> lots more engineering effort, but it's still catering to badly
> written queries, and we have better places to put the effort.
>
> (There have been plenty of previous discussions along this same line,
> btw.)
>
> regards, tom lane

Thank you for the feedback! I was not aware of such discussions,
thanks for pointing this out.

--
Matheus Alcantara
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2026-08-14 16:39:46 RE: Logical replication row filter loses unchanged toasted columns
Previous Message Nathan Bossart 2026-08-14 16:32:31 Re: future of PQfn()