Commit 113d359
committed
Fix segmentation fault that commit ac22929 caused.
Commit ac22929 changed recoveryWakeupLatch so that it's reset to
NULL at the end of recovery. This change could cause a segmentation fault
in the buildfarm member 'elver'.
Previously the latch was reset to NULL after calling ShutdownWalRcv().
But there could be a window between ShutdownWalRcv() and the actual
exit of walreceiver. If walreceiver set the latch during that window,
the segmentation fault could happen.
To fix the issue, this commit changes walreceiver so that it sets
the latch only when the latch has not been reset to NULL yet.
Author: Fujii Masao
Discussion: https://postgr.es/m/5c1f8a85-747c-7bf9-241e-dd467d8a3586@iki.fi1 parent 560564d commit 113d359
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12673 | 12673 | | |
12674 | 12674 | | |
12675 | 12675 | | |
12676 | | - | |
| 12676 | + | |
| 12677 | + | |
12677 | 12678 | | |
12678 | 12679 | | |
12679 | 12680 | | |
| |||
0 commit comments