aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r--src/backend/storage/lmgr/proc.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 77388f86ae0..4ee651e3069 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.203 2008/12/09 14:28:20 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.204 2008/12/09 15:59:39 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -289,7 +289,6 @@ InitProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->inCommit = false;
- MemSet(MyProc->signalFlags, 0, NUM_PROCSIGNALS * sizeof(sig_atomic_t));
MyProc->vacuumFlags = 0;
if (IsAutoVacuumWorkerProcess())
MyProc->vacuumFlags |= PROC_IS_AUTOVACUUM;
@@ -429,7 +428,6 @@ InitAuxiliaryProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->inCommit = false;
- MemSet(MyProc->signalFlags, 0, NUM_PROCSIGNALS * sizeof(sig_atomic_t));
/* we don't set the "is autovacuum" flag in the launcher */
MyProc->vacuumFlags = 0;
MyProc->lwWaiting = false;
@@ -1279,54 +1277,6 @@ ProcSendSignal(int pid)
PGSemaphoreUnlock(&proc->sem);
}
-/*
- * SendProcSignal - send the signal with the reason to a process.
- *
- * The process can be a backend or an auxiliary process that has a PGPROC
- * entry, like an autovacuum worker.
- */
-void
-SendProcSignal(PGPROC *proc, ProcSignalReason reason)
-{
- pid_t pid;
-
- /*
- * If the process is gone, do nothing.
- *
- * Since there's no locking, it's possible that the process detaches
- * from shared memory and exits right after this test, before we set
- * the flag and send signal. And the PGPROC entry might even be recycled
- * by a new process, so it's remotely possible that we signal a wrong
- * process. That's OK, all the signals are such that no harm is done.
- */
- pid = proc->pid;
- if (pid == 0)
- return;
-
- /* Atomically set the proper flag */
- proc->signalFlags[reason] = true;
- /* Send SIGUSR1 to the process */
- kill(pid, SIGUSR1);
-}
-
-/*
- * CheckProcSignal - check to see if the particular reason has been
- * signaled, and clear the signal flag. Should be called after
- * receiving SIGUSR1.
- */
-bool
-CheckProcSignal(ProcSignalReason reason)
-{
- /* Careful here --- don't clear flag if we haven't seen it set */
- if (MyProc->signalFlags[reason])
- {
- MyProc->signalFlags[reason] = false;
- return true;
- }
-
- return false;
-}
-
/*****************************************************************************
* SIGALRM interrupt support