Skip to content

Commit b9a46f8

Browse files
committed
Add missing CHECK_FOR_INTERRUPTS in lseg_inside_poly
Apparently, there are bugs in this code that cause it to loop endlessly. That bug still needs more research, but in the meantime it's clear that the loop is missing a check for interrupts so that it can be cancelled timely. Backpatch to 9.1 -- this has been missing since 49475aa.
1 parent affae5e commit b9a46f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/utils/adt/geo_ops.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <ctype.h>
2121

2222
#include "libpq/pqformat.h"
23+
#include "miscadmin.h"
2324
#include "utils/builtins.h"
2425
#include "utils/geo_decls.h"
2526

@@ -3894,6 +3895,8 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
38943895
{
38953896
Point *interpt;
38963897

3898+
CHECK_FOR_INTERRUPTS();
3899+
38973900
s.p[1] = poly->p[i];
38983901

38993902
if (on_ps_internal(t.p, &s))

0 commit comments

Comments
 (0)