diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-04 19:55:31 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-04 19:55:31 +0000 |
commit | fb5f1b2c13c0c1265f2d1244312fee256629a187 (patch) | |
tree | 840259e62246dd3cbfd8fc16af1174540b071262 /src/backend/access | |
parent | 5f067722bfd8b28946f5654f99f3971d33df12a3 (diff) | |
download | postgresql-fb5f1b2c13c0c1265f2d1244312fee256629a187.tar.gz postgresql-fb5f1b2c13c0c1265f2d1244312fee256629a187.zip |
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.
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/transam/xlog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index c0bfe968d25..e5c2f7d7582 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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); |