Re: Problem, partition pruning for prepared statement with IS NULL clause.

Sergei Glukhov <s.glukhov@postgrespro.ru>

From: Sergei Glukhov <s.glukhov@postgrespro.ru>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-10-11T09:09:36Z
Lists: pgsql-hackers
Hi,

Thanks for fixing this!

I verified that issues are fixed.

On 10/11/23 11:50, David Rowley wrote:

> I'm aiming to commit these as two separate fixes, so I'm going to go
> look again at the first one and wait to see if anyone wants to comment
> on this patch in the meantime.

Regarding test case for the first patch,
the line 'set plan_cache_mode = 'force_generic_plan';' is not necessary
since cache mode is set at the top of the test. On the other hand test
scenario can silently  be loosed if someone set another cache mode
somewhere upper. As you mentioned earlier it's worth maybe adding
the test for run-time partition pruning.

Regards,
Gluh




Commits

  1. Fix runtime partition pruning for HASH partitioned tables

  2. Fix incorrect step generation in HASH partition pruning