aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execParallel.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2022-12-30 19:44:48 +0100
committerTomas Vondra <tomas.vondra@postgresql.org>2022-12-30 20:47:58 +0100
commit883dc0214a64c0923455bf30bfcc5f953e70af39 (patch)
tree9a6cbe5c6d09248d44ce9b6711d1da7b5003670a /src/backend/executor/execParallel.c
parent169d301f3305b47eff0cddd48aa0a563a3c38d4b (diff)
downloadpostgresql-883dc0214a64c0923455bf30bfcc5f953e70af39.tar.gz
postgresql-883dc0214a64c0923455bf30bfcc5f953e70af39.zip
Fix assert in BRIN build_distances
When brin_minmax_multi_union merges summaries, we may end up with just a single range after merge_overlapping_ranges. The summaries may contain just one range each, and they may overlap (or be exactly the same). With a single range there's no distance to calculate, but we happen to call build_distances anyway - which is fine, we don't calculate the distance in this case, except that with asserts this failed due to a check there are at least two ranges. The assert is unnecessarily strict, so relax it a bit and bail out if there's just a single range. The relaxed assert would be enough, but this way we don't allocate unnecessary memory for distance. Backpatch to 14, where minmax-multi opclasses were introduced. Reported-by: Jaime Casanova Backpatch-through: 14 Discussion: https://postgr.es/m/YzVA55qS0hgz8P3r@ahch-to
Diffstat (limited to 'src/backend/executor/execParallel.c')
0 files changed, 0 insertions, 0 deletions