- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit8fb13dd
committed
Move extra code out of the Pre/PostRestoreCommand() section.
If SIGTERM is received within this section, the startup processwill immediately proc_exit() in the signal handler, so it isinadvisable to include any more code than is required there (assuch code is unlikely to be compatible with doing proc_exit() in asignal handler). This commit moves the code recently added to thissection (see1b06d7b and7fed801) to outside of the section.This ensures that the startup process only calls proc_exit() in itsSIGTERM handler for the duration of the system() call, which is howthis code worked from v8.4 to v14.Reported-by: Michael Paquier, Thomas MunroAnalyzed-by: Andres FreundSuggested-by: Tom LaneReviewed-by: Michael Paquier, Robert Haas, Thomas Munro, Andres FreundDiscussion:https://postgr.es/m/Y9nGDSgIm83FHcad%40paquier.xyzDiscussion:https://postgr.es/m/20230223231503.GA743455%40nathanxps13Backpatch-through: 151 parenta70bce4 commit8fb13dd
1 file changed
+11
-4
lines changedLines changed: 11 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 |
| |
163 |
| - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
164 | 172 |
| |
165 | 173 |
| |
166 | 174 |
| |
167 | 175 |
| |
168 | 176 |
| |
169 | 177 |
| |
170 |
| - | |
171 |
| - | |
172 | 178 |
| |
173 |
| - | |
174 | 179 |
| |
175 | 180 |
| |
| 181 | + | |
| 182 | + | |
176 | 183 |
| |
177 | 184 |
| |
178 | 185 |
| |
|
0 commit comments
Comments
(0)