- Notifications
You must be signed in to change notification settings - Fork5
Commita64ca63
committed
Use WaitLatch, not pg_usleep, for delaying in pg_sleep().
This avoids platform-dependent behavior wherein pg_sleep() might fail to beinterrupted by statement timeout, query cancel, SIGTERM, etc. Also, sincethere's no reason to wake up once a second any more, we can reduce thepower consumption of a sleeping backend a tad.Back-patch to 9.3, since use of SA_RESTART for SIGALRM makes this a biggerissue than it used to be.1 parentf69aece commita64ca63
1 file changed
+17
-10
lines changedLines changed: 17 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
387 |
| - | |
388 |
| - | |
389 |
| - | |
390 |
| - | |
391 |
| - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
392 | 392 |
| |
393 | 393 |
| |
394 | 394 |
| |
395 |
| - | |
396 |
| - | |
| 395 | + | |
| 396 | + | |
397 | 397 |
| |
398 | 398 |
| |
399 | 399 |
| |
| |||
407 | 407 |
| |
408 | 408 |
| |
409 | 409 |
| |
| 410 | + | |
410 | 411 |
| |
411 | 412 |
| |
| 413 | + | |
412 | 414 |
| |
413 |
| - | |
414 |
| - | |
| 415 | + | |
| 416 | + | |
415 | 417 |
| |
416 |
| - | |
| 418 | + | |
417 | 419 |
| |
418 | 420 |
| |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
419 | 426 |
| |
420 | 427 |
| |
421 | 428 |
| |
|
0 commit comments
Comments
(0)