Content-Length: 262428 | pFad | http://github.com/postgrespro/postgres/commit/113d3591b859fb8dc191bc0599d1ad62d91f1aa4

5B Fix segmentation fault that commit ac22929a26 caused. · postgrespro/postgres@113d359 · GitHub
Skip to content

Commit 113d359

Browse files
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.fi
1 parent 560564d commit 113d359

File tree

1 file changed

+2
-1
lines changed
  • src/backend/access/transam

1 file changed

+2
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12673,7 +12673,8 @@ CheckPromoteSignal(void)
1267312673
void
1267412674
WakeupRecovery(void)
1267512675
{
12676-
SetLatch(XLogCtl->recoveryWakeupLatch);
12676+
if (XLogCtl->recoveryWakeupLatch)
12677+
SetLatch(XLogCtl->recoveryWakeupLatch);
1267712678
}
1267812679

1267912680
/*

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/113d3591b859fb8dc191bc0599d1ad62d91f1aa4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy