Commit ade976f
committed
BRIN: be more strict about required support procs
With improperly defined operator classes, it's possible to get a
Postgres crash because we'd try to invoke a procedure that doesn't
exist. This is because the code is being a bit too trusting that the
opclass is correctly defined. Add some ereport(ERROR)s for cases where
mandatory support procedures are not defined, transforming the crashes
into errors.
The particular case that was reported is an incomplete opclass in
PostGIS.
Backpatch all the way down to 13.
Reported-by: Tobias Wendorff <tobias.wendorff@tu-dortmund.de>
Diagnosed-by: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Discussion: https://postgr.es/m/fb6d9a35-6c8e-4869-af80-0a4944a793a4@tu-dortmund.de1 parent f1ef111 commit ade976f
File tree
3 files changed
+28
-41
lines changed- src/backend/access/brin
3 files changed
+28
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
443 | 442 | | |
444 | 443 | | |
445 | 444 | | |
| |||
715 | 714 | | |
716 | 715 | | |
717 | 716 | | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | 717 | | |
726 | 718 | | |
727 | 719 | | |
728 | 720 | | |
729 | | - | |
730 | 721 | | |
731 | 722 | | |
732 | 723 | | |
733 | | - | |
734 | 724 | | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
739 | 730 | | |
740 | 731 | | |
741 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
| 224 | + | |
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
| |||
506 | 505 | | |
507 | 506 | | |
508 | 507 | | |
509 | | - | |
| 508 | + | |
510 | 509 | | |
511 | 510 | | |
512 | 511 | | |
| |||
517 | 516 | | |
518 | 517 | | |
519 | 518 | | |
520 | | - | |
521 | | - | |
| 519 | + | |
522 | 520 | | |
523 | 521 | | |
524 | 522 | | |
| |||
539 | 537 | | |
540 | 538 | | |
541 | 539 | | |
542 | | - | |
| 540 | + | |
| 541 | + | |
543 | 542 | | |
544 | 543 | | |
545 | | - | |
| 544 | + | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
568 | 567 | | |
569 | 568 | | |
570 | 569 | | |
571 | | - | |
572 | 570 | | |
573 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
574 | 579 | | |
575 | 580 | | |
576 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
2872 | 2871 | | |
2873 | 2872 | | |
2874 | 2873 | | |
2875 | | - | |
2876 | | - | |
2877 | | - | |
2878 | | - | |
2879 | | - | |
2880 | | - | |
2881 | | - | |
2882 | 2874 | | |
2883 | 2875 | | |
2884 | 2876 | | |
2885 | 2877 | | |
2886 | | - | |
2887 | 2878 | | |
2888 | 2879 | | |
2889 | 2880 | | |
2890 | | - | |
2891 | 2881 | | |
2892 | | - | |
2893 | | - | |
2894 | | - | |
2895 | | - | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
2896 | 2887 | | |
2897 | 2888 | | |
2898 | 2889 | | |
| |||
0 commit comments