Re: Failing assertions in indxpath.c, placeholder.c and brin_minmax.c
Alvaro Herrera <alvherre@2ndquadrant.com>
Tom Lane wrote: > Alvaro Herrera <alvherre@2ndquadrant.com> writes: > > Tom Lane wrote: > >> Bottom line is that somebody failed to consider the possibility of a > >> null comparison value reaching the BRIN index lookup machinery. > >> The code stanza that's failing supposes that only IS NULL or IS NOT NULL > >> tests could have SK_ISNULL set, but that's just wrong. > > > I think the easiest way to solve this is to consider that all indexable > > operators are strict, and have the function return false in that case. > > The attached patch implements that. > > This looks fine to me as a localized fix. I was wondering whether we > could short-circuit the index lookup further upstream, but I take it from > your comment about _bt_preprocess_keys that BRIN has no convenient place > for that today. (Even if it did, I'd still vote for making this change, > for safety's sake.) Yeah, it doesn't currently. Hopefully we will improve that in the future. Particularly with regards to array keys I think there's a lot to be done there. I pushed this as is. I hesitated about adding a regression test, but it didn't seem worthwhile in the end, because if in the future we improve scan key analysis, we will need much more extensive testing, and this doesn't look like the type of bug that we could reintroduce in a whim. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Fix broken assertion in BRIN code
- c81276241b61 9.6.0 landed
- 244c378e243e 9.5.0 landed
-
Support flattening of empty-FROM subqueries and one-row VALUES tables.
- f4abd0241de2 9.5.0 cited
-
Fix resource leak pointed out by Coverity.
- 3b5a89c4820f 9.5.0 cited
-
Add missing volatile qualifier.
- 68e66923ff62 9.5.0 cited
-
Remove dependency on wsock32.lib in favor of ws2_32
- a16bac36eca8 9.5.0 cited
-
Check interrupts during logical decoding more frequently.
- 1cbc94801062 9.5.0 cited
-
Fix contrib/pg_upgrade/test.sh for $PWD containing spaces.
- 686f362bee12 9.5.0 cited
-
Secure Unix-domain sockets of "make check" temporary clusters.
- be76a6d39e28 9.5.0 cited
-
Adjust 9.4 release notes.
- a7205d81573c 9.5.0 cited
-
Improve predtest.c's ability to reason about operator expressions.
- 3f8c23c4d31d 9.5.0 cited
-
Fix pg_restore's processing of old-style BLOB COMMENTS data.
- c81e63d85f0c 9.5.0 cited
-
Improve tuplestore's error messages for I/O failures.
- 6554656ea204 9.5.0 cited
-
Remove unnecessary output expressions from unflattened subqueries.
- 55d5b3c08279 9.5.0 cited
-
Stamp 9.4beta1.
- e6df2e1be633 9.4.0 cited