- Notifications
You must be signed in to change notification settings - Fork5
Commit1c7fe33
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 parent454333a commit1c7fe33
2 files changed
+27
-2
lines changedLines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
223 | 235 |
| |
224 | 236 |
| |
225 | 237 |
| |
|
Lines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + |
0 commit comments
Comments
(0)