mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Merge three existing ways of signaling postmaster from child processes,
so that only one signal number is used not three. Flags in shared memory tell the reason(s) for the current signal. This method is extensible to handle more signal reasons without chewing up even more signal numbers, but the immediate reason is to keep pg_pwd reloads separate from SIGHUP processing in the postmaster. Also clean up some problems in the postmaster with delayed response to checkpoint status changes --- basically, it wouldn't schedule a checkpoint if it wasn't getting connection requests on a regular basis.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.80 2001/10/28 06:25:42 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.81 2001/11/04 19:55:31 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -35,6 +35,7 @@
|
||||
#include "catalog/pg_control.h"
|
||||
#include "storage/bufpage.h"
|
||||
#include "storage/lwlock.h"
|
||||
#include "storage/pmsignal.h"
|
||||
#include "storage/proc.h"
|
||||
#include "storage/sinval.h"
|
||||
#include "storage/spin.h"
|
||||
@ -1048,7 +1049,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
|
||||
{
|
||||
if (XLOG_DEBUG)
|
||||
elog(DEBUG, "XLogWrite: time for a checkpoint, signaling postmaster");
|
||||
kill(getppid(), SIGUSR1);
|
||||
SendPostmasterSignal(PMSIGNAL_DO_CHECKPOINT);
|
||||
}
|
||||
}
|
||||
LWLockRelease(ControlFileLock);
|
||||
|
Reference in New Issue
Block a user