Re: BUG #18344: Pruning tables partitioned by bool range fails with invalid strategy
Alexander Law <exclusion@gmail.com>
From: Alexander Lakhin <exclusion@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Langote <amitlan@postgresql.org>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, pgsql-bugs@lists.postgresql.org
Date: 2024-02-20T03:00:00Z
Lists: pgsql-bugs
Hello David, 19.02.2024 02:49, David Rowley wrote: > > Here's a more complete patch for this. I included some tests for LIST > and RANGE partitioned tables. I did manual testing for HASH, and was > on the fence about covering that too. > Thank you for the fix! Beside that, I'm a bit confused by the opstrategy description for get_matching_range_bounds(). Above that function we have: * 'opstrategy' if non-zero must be a btree strategy number. But as we could see, zero opstrategy is not valid for the function (so "if non-zero" is meaningless here?), unlike opstrategy for get_matching_list_bounds(), which has the same description, but the latter function contains: /* Special case handling of values coming from a <> operator clause. */ if (opstrategy == InvalidStrategy) ... Best regards, Alexander
Commits
-
Minor corrections for partition pruning
- d2ca9a50b5b9 17.0 landed
-
Fix incorrect pruning of NULL partition for boolean IS NOT clauses
- 3ffcd24c29c6 12.19 landed
- 3850fcca69b5 13.15 landed
- f9c8f7ccd6e3 14.12 landed
- 1b3495e29db6 15.7 landed
- fb95cc72bfe7 16.3 landed
- 4c2369ac5d0a 17.0 landed