Skip to content

Commit b98ac46

Browse files
Prevent intermittent hang in recovery from bgwriter interaction.
Startup process waited for cleanup lock but when hot_standby = off the pid was not registered, so that the bgwriter would not wake the waiting process as intended.
1 parent 856a230 commit b98ac46

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "storage/latch.h"
5050
#include "storage/pmsignal.h"
5151
#include "storage/predicate.h"
52+
#include "storage/proc.h"
5253
#include "storage/procarray.h"
5354
#include "storage/reinit.h"
5455
#include "storage/smgr.h"
@@ -6406,6 +6407,7 @@ StartupXLOG(void)
64066407
*/
64076408
if (InArchiveRecovery && IsUnderPostmaster)
64086409
{
6410+
PublishStartupProcessInformation();
64096411
SetForwardFsyncRequests();
64106412
SendPostmasterSignal(PMSIGNAL_RECOVERY_STARTED);
64116413
bgwriterLaunched = true;

src/backend/storage/ipc/standby.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ InitRecoveryTransactionEnvironment(void)
6868
*/
6969
SharedInvalBackendInit(true);
7070

71-
/*
72-
* Record the PID and PGPROC structure of the startup process.
73-
*/
74-
PublishStartupProcessInformation();
75-
7671
/*
7772
* Lock a virtual transaction id for Startup process.
7873
*

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