forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3b8d23a
committed
Make dsm_impl_posix_resize more future-proof.
Commit4518c79 blocks signals for a short region of code, but itassumed that whatever called it had the signal mask set to UnBlockSig onentry. That may be true today (or may even not be, in extensions in thewild), but it would be better not to make that assumption. We shouldsave-and-restore the caller's signal mask.The PG_SETMASK() portability macro couldn't be used for that, which iswhy it wasn't done before. But... considering that commita65e086established back in 9.6 that supported POSIX systems have sigprocmask(),and that this is POSIX-only code, there is no reason not to use standardsigprocmask() directly to achieve that.Back-patch to all supported releases, like4518c79 and80845b7.Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/CA%2BhUKGKx6Biq7_UuV0kn9DW%2B8QWcpJC1qwhizdtD9tN-fn0H0g%40mail.gmail.com1 parent3a0e385 commit3b8d23a
1 file changed
+5
-3
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
| |||
62 | 63 |
| |
63 | 64 |
| |
64 | 65 |
| |
65 |
| - | |
| 66 | + | |
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
| |||
355 | 356 |
| |
356 | 357 |
| |
357 | 358 |
| |
| 359 | + | |
358 | 360 |
| |
359 | 361 |
| |
360 | 362 |
| |
| |||
363 | 365 |
| |
364 | 366 |
| |
365 | 367 |
| |
366 |
| - | |
| 368 | + | |
367 | 369 |
| |
368 | 370 |
| |
369 | 371 |
| |
| |||
402 | 404 |
| |
403 | 405 |
| |
404 | 406 |
| |
405 |
| - | |
| 407 | + | |
406 | 408 |
| |
407 | 409 |
| |
408 | 410 |
| |
|
0 commit comments
Comments
(0)