forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit882e522
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 parentfdfb141 commit882e522
1 file changed
+10
-3
lines changedLines changed: 10 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
| 164 | + | |
| 165 | + | |
164 | 166 |
| |
165 |
| - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
166 | 173 |
| |
167 | 174 |
| |
168 | 175 |
| |
169 | 176 |
| |
170 | 177 |
| |
171 | 178 |
| |
172 |
| - | |
173 | 179 |
| |
174 |
| - | |
175 | 180 |
| |
176 | 181 |
| |
| 182 | + | |
| 183 | + | |
177 | 184 |
| |
178 | 185 |
| |
179 | 186 |
| |
|
0 commit comments
Comments
(0)