Re: PG11 - Multiple Key Range Partition
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Rares Salcudean <rares.salcudean@takeofflabs.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-07-10T10:06:39Z
Lists: pgsql-bugs
Attachments
- fix_boolean_partition_pruning.patch (application/octet-stream) patch
On Wed, 10 Jul 2019 at 21:02, Amit Langote <amitlangote09@gmail.com> wrote: > > On Wed, Jul 10, 2019 at 5:37 PM David Rowley > > Thanks for making the test case. It is a bug. There's a problem in > > match_clause_to_partition_key() where because > > match_boolean_partition_clause() returns false for the "NOT b" > > condition when comparing to the first partition key this causes the > > function to return PARTCLAUSE_UNSUPPORTED which causes the calling > > function to not bother trying to match that qual up to any other > > partition key. > > Oops, indeed a bug. Should've returned PARTCLAUSE_NOMATCH there. Here's a first draft fix for this, based on master. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Fix RANGE partition pruning with multiple boolean partition keys
- cfde23493938 13.0 landed
- 30a268ed2e29 12.0 landed
- 757f1baa8c13 11.5 landed