forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbcd5b4b
committed
Fix crash in autoprewarm.
Commitabb0b4f moved the shared state for autoprewarm to adynamic shared memory (DSM) segment, but it left apw_detach_shmem()in the on_shmem_exit callback list for the autoprewarm leaderprocess. This is a problem because shmem_exit() detaches all theDSM segments prior to calling the on_shmem_exit callbacks, thusproducing segfaults in the exit path for the autoprewarm leaderprocess.To fix, move apw_detach_shmem() to the before_shmem_exit callbacklist. This commit also adds a check to pg_prewarm's test that theserver shut down normally. It might be worth making this a commoncheck for all shutdowns in TAP tests, but that is left as a futureexercise.Reported-by: Andres FreundReviewed-by: Andres Freund, Álvaro HerreraDiscussion:https://postgr.es/m/20240122204117.swton324xcoodnyi%40awork3.anarazel.de1 parent79b03db commitbcd5b4b
2 files changed
+14
-2
lines changedLines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 |
| - | |
168 |
| - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
169 | 175 |
| |
170 | 176 |
| |
171 | 177 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
58 | 64 |
|
0 commit comments
Comments
(0)