- Notifications
You must be signed in to change notification settings - Fork28
Commite82d9e6
committed
Adjust elog.c so that elog(FATAL) exits (including cases where ERROR is
promoted to FATAL) end in exit(1) not exit(0). Then change the postmaster toallow exit(1) without a system-wide panic, but not for the startup subprocessor the bgwriter. There were a couple of places that were using exit(1) todeliberately force a system-wide panic; adjust these to be exit(2) instead.This fixes the problem noted back in July that if the startup process exitswith elog(ERROR), the postmaster would think everything is hunky-dory andproceed to start up. Alternative solutions such as trying to run the entirestartup process as a critical section seem less clean, primarily because ofthe fact that a fair amount of startup code is shared by all postmasterchildren in the EXEC_BACKEND case. We'd need an ugly special case somewherenear the head of main.c to make it work if it's the child process'sresponsibility to determine what happens; and what's the point when thepostmaster already treats different children differently?1 parent778bb7b commite82d9e6
File tree
5 files changed
+39
-40
lines changed- src/backend
- bootstrap
- postmaster
- tcop
- utils/error
5 files changed
+39
-40
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 | | |
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | 424 | | |
431 | 425 | | |
432 | | - | |
433 | 426 | | |
434 | 427 | | |
435 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
| 511 | + | |
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
361 | 365 | | |
362 | 366 | | |
363 | 367 | | |
| |||
2025 | 2029 | | |
2026 | 2030 | | |
2027 | 2031 | | |
2028 | | - | |
| 2032 | + | |
| 2033 | + | |
2029 | 2034 | | |
2030 | 2035 | | |
2031 | 2036 | | |
| |||
2078 | 2083 | | |
2079 | 2084 | | |
2080 | 2085 | | |
2081 | | - | |
| 2086 | + | |
| 2087 | + | |
2082 | 2088 | | |
2083 | 2089 | | |
2084 | 2090 | | |
| |||
2096 | 2102 | | |
2097 | 2103 | | |
2098 | 2104 | | |
2099 | | - | |
| 2105 | + | |
| 2106 | + | |
2100 | 2107 | | |
2101 | 2108 | | |
2102 | 2109 | | |
2103 | 2110 | | |
2104 | 2111 | | |
2105 | 2112 | | |
2106 | 2113 | | |
2107 | | - | |
2108 | | - | |
2109 | | - | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
2110 | 2118 | | |
2111 | 2119 | | |
2112 | 2120 | | |
2113 | 2121 | | |
2114 | 2122 | | |
2115 | | - | |
| 2123 | + | |
2116 | 2124 | | |
2117 | 2125 | | |
2118 | 2126 | | |
| |||
2126 | 2134 | | |
2127 | 2135 | | |
2128 | 2136 | | |
2129 | | - | |
| 2137 | + | |
2130 | 2138 | | |
2131 | 2139 | | |
2132 | 2140 | | |
| |||
2143 | 2151 | | |
2144 | 2152 | | |
2145 | 2153 | | |
2146 | | - | |
| 2154 | + | |
2147 | 2155 | | |
2148 | 2156 | | |
2149 | 2157 | | |
| |||
2157 | 2165 | | |
2158 | 2166 | | |
2159 | 2167 | | |
2160 | | - | |
| 2168 | + | |
2161 | 2169 | | |
2162 | 2170 | | |
2163 | 2171 | | |
| |||
2229 | 2237 | | |
2230 | 2238 | | |
2231 | 2239 | | |
2232 | | - | |
2233 | | - | |
2234 | | - | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
2235 | 2243 | | |
2236 | 2244 | | |
2237 | | - | |
| 2245 | + | |
2238 | 2246 | | |
2239 | 2247 | | |
2240 | 2248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
2327 | 2327 | | |
2328 | 2328 | | |
2329 | 2329 | | |
2330 | | - | |
| 2330 | + | |
2331 | 2331 | | |
2332 | 2332 | | |
2333 | 2333 | | |
2334 | 2334 | | |
2335 | | - | |
| 2335 | + | |
2336 | 2336 | | |
2337 | 2337 | | |
2338 | 2338 | | |
| |||
2374 | 2374 | | |
2375 | 2375 | | |
2376 | 2376 | | |
2377 | | - | |
| 2377 | + | |
2378 | 2378 | | |
2379 | 2379 | | |
2380 | 2380 | | |
| |||
2383 | 2383 | | |
2384 | 2384 | | |
2385 | 2385 | | |
2386 | | - | |
| 2386 | + | |
2387 | 2387 | | |
2388 | 2388 | | |
2389 | 2389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
435 | 433 | | |
436 | | - | |
| 434 | + | |
437 | 435 | | |
438 | 436 | | |
439 | 437 | | |
440 | 438 | | |
441 | 439 | | |
442 | | - | |
| 440 | + | |
443 | 441 | | |
444 | 442 | | |
445 | 443 | | |
| |||
0 commit comments
Comments
(0)