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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy