forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit14bc951
committed
Fix low-probability bug in relcache startup: write_irels wrote the
pg_internal.init file in-place, which meant that if another backendstarted at about the same time, it might read the incomplete file.init_irels tries to guard against that, but I have now seen a crashdue to reading bad data from a partly-written file. (This may indicatea kernel bug on my platform? Not sure.) Anyway, clearly the safestcourse is to write the new pg_internal.init file under a unique temporaryfilename, and rename it into place only after it's all written.1 parentdbc9346 commit14bc951
1 file changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
2266 | 2267 | | |
2267 | 2268 | | |
2268 | 2269 | | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
2269 | 2282 | | |
2270 | 2283 | | |
2271 | | - | |
| 2284 | + | |
2272 | 2285 | | |
2273 | | - | |
| 2286 | + | |
2274 | 2287 | | |
2275 | 2288 | | |
2276 | | - | |
| 2289 | + | |
2277 | 2290 | | |
2278 | 2291 | | |
2279 | 2292 | | |
| |||
2397 | 2410 | | |
2398 | 2411 | | |
2399 | 2412 | | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2400 | 2419 | | |
0 commit comments
Comments
(0)