forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit21fb39c
committed
Set max_safe_fds whenever we create shared memory and semaphores.
Formerly we skipped this in bootstrap/check mode and in single-usermode. That's bad in check mode because it may allow accepting avalue of max_connections that doesn't actually work: on platformswhere semaphores consume file descriptors, there may not be enoughfree FDs left over to satisfy fd.c, causing postmaster start tofail. It's also not great in single-user mode, because fd.c willoperate with just the minimum allowable value of max_safe_fds,resulting in excess file open/close overhead if anything moderatelycomplicated is done in single-user mode. (There may be some penaltyfor bootstrap mode too, though probably not much.)Discussion:https://postgr.es/m/2081982.1734393311@sss.pgh.pa.us1 parentc91963d commit21fb39c
2 files changed
+16
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
334 | 334 |
| |
335 | 335 |
| |
336 | 336 |
| |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
337 | 343 |
| |
338 | 344 |
| |
339 | 345 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4099 | 4099 |
| |
4100 | 4100 |
| |
4101 | 4101 |
| |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
4102 | 4106 |
| |
4103 | 4107 |
| |
| 4108 | + | |
| 4109 | + | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
4104 | 4114 |
| |
4105 | 4115 |
| |
4106 | 4116 |
| |
|
0 commit comments
Comments
(0)