- Notifications
You must be signed in to change notification settings - Fork5
Commit5f60086
committed
Minor adjustments to make failures in startup/shutdown behave more cleanly.
StartupXLOG and ShutdownXLOG no longer need to be critical sections, becausein all contexts where they are invoked, elog(ERROR) would be translated toelog(FATAL) anyway. (One change in bgwriter.c is needed to make this true:set ExitOnAnyError before trying to exit. This is a good fix anyway sincethe existing code would have gone into an infinite loop on elog(ERROR) duringshutdown.) That avoids a misleading report of PANIC during semi-orderlyfailures. Modify the postmaster to include the startup process in the set ofprocesses that get SIGTERM when a fast shutdown is requested, and also fix itto not try to restart the bgwriter if the bgwriter fails while trying to writethe shutdown checkpoint. Net result is that "pg_ctl stop -m fast" doessomething reasonable for a system in warm standby mode, and so should Unixsystem shutdown (ie, universal SIGTERM). Per gripe from Stephen Harris andsome corner-case testing of my own.1 parentef148d6 commit5f60086
File tree
3 files changed
+32
-14
lines changed- src/backend
- access/transam
- postmaster
3 files changed
+32
-14
lines changedLines changed: 2 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
4651 | 4651 |
| |
4652 | 4652 |
| |
4653 | 4653 |
| |
4654 |
| - | |
4655 |
| - | |
4656 | 4654 |
| |
4657 | 4655 |
| |
4658 | 4656 |
| |
| |||
5188 | 5186 |
| |
5189 | 5187 |
| |
5190 | 5188 |
| |
5191 |
| - | |
5192 | 5189 |
| |
5193 | 5190 |
| |
5194 | 5191 |
| |
| |||
5426 | 5423 |
| |
5427 | 5424 |
| |
5428 | 5425 |
| |
5429 |
| - | |
5430 | 5426 |
| |
5431 | 5427 |
| |
5432 | 5428 |
| |
5433 | 5429 |
| |
5434 |
| - | |
5435 | 5430 |
| |
5436 | 5431 |
| |
5437 | 5432 |
| |
| |||
5605 | 5600 |
| |
5606 | 5601 |
| |
5607 | 5602 |
| |
5608 |
| - | |
5609 |
| - | |
5610 |
| - | |
5611 |
| - | |
| 5603 | + | |
5612 | 5604 |
| |
5613 | 5605 |
| |
5614 | 5606 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
353 | 359 |
| |
354 | 360 |
| |
355 | 361 |
| |
|
Lines changed: 23 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
1934 | 1934 |
| |
1935 | 1935 |
| |
1936 | 1936 |
| |
1937 |
| - | |
1938 |
| - | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
1939 | 1944 |
| |
1940 | 1945 |
| |
1941 | 1946 |
| |
| |||
2108 | 2113 |
| |
2109 | 2114 |
| |
2110 | 2115 |
| |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
2111 | 2131 |
| |
2112 | 2132 |
| |
2113 | 2133 |
| |
|
0 commit comments
Comments
(0)