aboutsummaryrefslogtreecommitdiff
path: root/src/backend/postmaster/checkpointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/postmaster/checkpointer.c')
-rw-r--r--src/backend/postmaster/checkpointer.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index 3c9c216c6f1..237be121dd6 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -360,7 +360,7 @@ CheckpointerMain(void)
int rc;
/* Clear any already-pending wakeups */
- ResetLatch(&MyProc->procLatch);
+ ResetLatch(MyLatch);
/*
* Process any requests or signals received recently.
@@ -559,7 +559,7 @@ CheckpointerMain(void)
cur_timeout = Min(cur_timeout, XLogArchiveTimeout - elapsed_secs);
}
- rc = WaitLatch(&MyProc->procLatch,
+ rc = WaitLatch(MyLatch,
WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH,
cur_timeout * 1000L /* convert to ms */ );
@@ -832,8 +832,7 @@ ChkptSigHupHandler(SIGNAL_ARGS)
int save_errno = errno;
got_SIGHUP = true;
- if (MyProc)
- SetLatch(&MyProc->procLatch);
+ SetLatch(MyLatch);
errno = save_errno;
}
@@ -845,8 +844,7 @@ ReqCheckpointHandler(SIGNAL_ARGS)
int save_errno = errno;
checkpoint_requested = true;
- if (MyProc)
- SetLatch(&MyProc->procLatch);
+ SetLatch(MyLatch);
errno = save_errno;
}
@@ -869,8 +867,7 @@ ReqShutdownHandler(SIGNAL_ARGS)
int save_errno = errno;
shutdown_requested = true;
- if (MyProc)
- SetLatch(&MyProc->procLatch);
+ SetLatch(MyLatch);
errno = save_errno;
}