Re: Problem with default partition pruning - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Problem with default partition pruning
Date
Msg-id c677422b-b120-a622-fdff-44bd1158b4fe@lab.ntt.co.jp
Whole thread Raw
In response to RE: Problem with default partition pruning  ("Yuzuko Hosoya" <hosoya.yuzuko@lab.ntt.co.jp>)
Responses RE: Problem with default partition pruning
List pgsql-hackers
Hosoya-san,

On 2019/04/02 14:02, Yuzuko Hosoya wrote:
> Hi,
> 
>> Maybe we should have two patches as we seem to be improving two things:
>>
>> 1. Patch to fix problems with default partition pruning originally reported by Hosoya-san
>>
>> 2. Patch to determine if a given clause contradicts a sub-partitioned table's partition constraint,
>> fixing problems unearthed by Thibaut's tests
> 
> I attached the latest patches according to Amit comment.
> v3_default_partition_pruning.patch fixes default partition pruning problems
> and ignore_contradictory_where_clauses_at_partprune_step.patch fixes
> sub-partition problems Thibaut tested.

Thanks for dividing patches that way.

Would it be a good idea to add some new test cases to these patches, just
so it's easily apparent what we're changing?

So, we could add the test case presented by Thibaut at the following link
to the default_partition_pruning.patch:

https://www.postgresql.org/message-id/a4968068-6401-7a9c-8bd4-6a3bc9164a86%40dalibo.com

And, another reported at the following link to
ignore_contradictory_where_clauses_at_partprune_step.patch:

https://www.postgresql.org/message-id/bd03f475-30d4-c4d0-3d7f-d2fbde755971%40dalibo.com

Actually, it might be possible/better to construct the test queries in
partition_prune.sql using the existing tables in that script, that is,
without defining new tables just for adding the new test cases.  If not,
maybe it's OK to create the new tables too.

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: ToDo: show size of partitioned table
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: New vacuum option to do only freezing