- Notifications
You must be signed in to change notification settings - Fork5
Commit873ab97
committed
Use SA_RESTART for all signals, including SIGALRM.
The exclusion of SIGALRM dates back to Berkeley days, when Postgres usedSIGALRM in only one very short stretch of code. Nowadays, allowing it tointerrupt kernel calls doesn't seem like a very good idea, since its usefor statement_timeout means SIGALRM could occur anyplace in the code, andthere are far too many call sites where we aren't prepared to deal withEINTR failures. When third-party code is taken into consideration, itseems impossible that we ever could be fully EINTR-proof, so better touse SA_RESTART always and deal with the implications of that. One suchimplication is that we should not assume pg_usleep() will be terminatedearly by a signal. Therefore, long sleeps should probably be replacedby WaitLatch operations where practical.Back-patch to 9.3 so we can get some beta testing on this change.1 parent5242fef commit873ab97
2 files changed
+3
-5
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
405 | 405 |
| |
406 | 406 |
| |
407 | 407 |
| |
408 |
| - | |
409 |
| - | |
| 408 | + | |
| 409 | + | |
410 | 410 |
| |
411 | 411 |
| |
412 | 412 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
63 |
| - | |
64 |
| - | |
65 |
| - | |
| 63 | + | |
66 | 64 |
| |
67 | 65 |
| |
68 | 66 |
| |
|
0 commit comments
Comments
(0)