- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit7ca6422
committed
Fix failure to restart Postgres when Linux kernel returns EIDRM for shmctl().
This is a Linux kernel bug that apparently exists in every extant kernelversion: sometimes shmctl() will fail with EIDRM when EINVAL is correct.We were assuming that EIDRM indicates a possible conflict with pre-existingbackends, and refusing to start the postmaster when this happens. Fortunately,there does not seem to be any case where Linux can legitimately return EIDRM(it doesn't track shmem segments in a way that would allow that), so we canget away with just assuming that EIDRM means EINVAL on this platform.Per reports from Michael Fuhr and Jon Lapham --- it's a bit surprisingwe have not seen more reports, actually.1 parent175c3b8 commit7ca6422
2 files changed
+37
-6
lines changedLines changed: 24 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 | 222 |
| |
227 | 223 |
| |
228 | 224 |
| |
| |||
233 | 229 |
| |
234 | 230 |
| |
235 | 231 |
| |
236 |
| - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
237 | 255 |
| |
238 | 256 |
| |
239 | 257 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + |
0 commit comments
Comments
(0)