postgres.git / summary / log / commit / refs

commit    b98ac467f5d35970edade4ad65c767fc89059026
Author:   Simon Riggs <simon@2ndQuadrant.com>
Date:     Wed Mar 23 13:30:05 2011 +0000
First released in: 9.1.0, 9.0.4

    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.


src/backend/access/transam/xlog.c | 2 ++ src/backend/storage/ipc/standby.c | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 306ac058c36..5a585f60d0b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -49,6 +49,7 @@ #include "storage/latch.h" #include "storage/pmsignal.h" #include "storage/predicate.h" +#include "storage/proc.h" #include "storage/procarray.h" #include "storage/reinit.h" #include "storage/smgr.h" @@ -6406,6 +6407,7 @@ StartupXLOG(void) */ if (InArchiveRecovery && IsUnderPostmaster) { + PublishStartupProcessInformation(); SetForwardFsyncRequests(); SendPostmasterSignal(PMSIGNAL_RECOVERY_STARTED); bgwriterLaunched = true; diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index a92ae4af590..2e71484126d 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -68,11 +68,6 @@ InitRecoveryTransactionEnvironment(void) */ SharedInvalBackendInit(true); - /* - * Record the PID and PGPROC structure of the startup process. - */ - PublishStartupProcessInformation(); - /* * Lock a virtual transaction id for Startup process. * [parent: 856a23018c97]