Commit 8f34811
committed
Insert CHECK_FOR_INTERRUPTS() calls into btree and hash index scans at the
points where we step right or left to the next page. This should ensure
reasonable response time to a query cancel request during an unsuccessful
index scan, as seen in recent gripe from Marc Cousin. It's a bit trickier
than it might seem at first glance, because CHECK_FOR_INTERRUPTS() is a no-op
if executed while holding a buffer lock. So we have to do it just at the
point where we've dropped one page lock and not yet acquired the next.
Remove CHECK_FOR_INTERRUPTS calls at the top level of btgetbitmap and
hashgetbitmap, since they're pointless given the added checks.
I think that GIST is okay already --- at least, there's a CHECK_FOR_INTERRUPTS
at a plausible-looking place in gistnext(). I don't claim to know GIN well
enough to try to poke it for this, if indeed it has a problem at all.
This is a pre-existing issue, but in view of the lack of prior complaints
I'm not going to risk back-patching.1 parent 2aa5ca9 commit 8f34811
File tree
4 files changed
+21
-18
lines changed- src/backend/access
- hash
- nbtree
4 files changed
+21
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
300 | | - | |
301 | | - | |
302 | 299 | | |
303 | 300 | | |
304 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
318 | | - | |
319 | | - | |
320 | 317 | | |
321 | 318 | | |
322 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
1126 | 1127 | | |
1127 | 1128 | | |
1128 | 1129 | | |
1129 | | - | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1130 | 1134 | | |
1131 | | - | |
1132 | | - | |
1133 | | - | |
1134 | 1135 | | |
1135 | | - | |
| 1136 | + | |
| 1137 | + | |
1136 | 1138 | | |
1137 | | - | |
1138 | | - | |
| 1139 | + | |
1139 | 1140 | | |
1140 | 1141 | | |
1141 | 1142 | | |
| |||
1239 | 1240 | | |
1240 | 1241 | | |
1241 | 1242 | | |
1242 | | - | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
1243 | 1247 | | |
1244 | 1248 | | |
1245 | 1249 | | |
| |||
0 commit comments