forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6322e84
committed
Change StatementCancelHandler() to check the DoingCommandRead flag to decide
whether to execute an immediate interrupt, rather than testing whetherLockWaitCancel() cancelled a lock wait. The old way misclassified the casewhere we were blocked in ProcWaitForSignal(), and arguably would misclassifyany other future additions of new ImmediateInterruptOK states too. Thisallows reverting the old kluge that gave LockWaitCancel() a return value,since no callers care anymore. Improve comments in the variousimplementations of PGSemaphoreLock() to explain that on some platforms, theassumption that semop() exits after a signal is wrong, and so we must ensurethat the signal handler itself throws elog if we want cancel or die interruptsto be effective. Per testing related to bug #3883, though this patch doesn'tsolve those problems fully.Perhaps this change should be back-patched, but since pre-8.3 branches aren'treally relying on autovacuum to respond to SIGINT, it doesn't seem criticalfor them.1 parentace1b29 commit6322e84
File tree
6 files changed
+39
-64
lines changed- src
- backend
- port
- storage/lmgr
- tcop
- include/storage
6 files changed
+39
-64
lines changedLines changed: 5 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 |
| - | |
271 |
| - | |
272 |
| - | |
273 |
| - | |
274 |
| - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
275 | 248 |
| |
276 | 249 |
| |
277 | 250 |
| |
|
Lines changed: 14 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
377 | 377 |
| |
378 | 378 |
| |
379 | 379 |
| |
380 |
| - | |
381 |
| - | |
382 |
| - | |
383 |
| - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
384 | 385 |
| |
385 | 386 |
| |
386 | 387 |
| |
| |||
403 | 404 |
| |
404 | 405 |
| |
405 | 406 |
| |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
406 | 415 |
| |
407 | 416 |
| |
408 | 417 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 |
| |
128 | 134 |
| |
129 | 135 |
| |
|
Lines changed: 3 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
486 | 486 |
| |
487 | 487 |
| |
488 | 488 |
| |
489 |
| - | |
490 |
| - | |
491 | 489 |
| |
492 | 490 |
| |
493 | 491 |
| |
494 | 492 |
| |
495 |
| - | |
| 493 | + | |
496 | 494 |
| |
497 | 495 |
| |
498 | 496 |
| |
499 | 497 |
| |
500 | 498 |
| |
501 | 499 |
| |
502 |
| - | |
| 500 | + | |
503 | 501 |
| |
504 | 502 |
| |
505 | 503 |
| |
| |||
538 | 536 |
| |
539 | 537 |
| |
540 | 538 |
| |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 |
| - | |
547 | 539 |
| |
548 | 540 |
| |
549 | 541 |
| |
|
Lines changed: 8 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
2449 | 2449 |
| |
2450 | 2450 |
| |
2451 | 2451 |
| |
| 2452 | + | |
2452 | 2453 |
| |
2453 | 2454 |
| |
2454 |
| - | |
2455 |
| - | |
2456 | 2455 |
| |
2457 | 2456 |
| |
2458 | 2457 |
| |
| |||
2498 | 2497 |
| |
2499 | 2498 |
| |
2500 | 2499 |
| |
2501 |
| - | |
| 2500 | + | |
2502 | 2501 |
| |
2503 | 2502 |
| |
2504 | 2503 |
| |
2505 | 2504 |
| |
2506 |
| - | |
2507 |
| - | |
2508 |
| - | |
2509 |
| - | |
2510 |
| - | |
2511 |
| - | |
2512 |
| - | |
2513 |
| - | |
2514 |
| - | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
2515 | 2510 |
| |
2516 | 2511 |
| |
2517 | 2512 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 |
| - | |
| 169 | + | |
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
|
0 commit comments
Comments
(0)