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/commands/user.c | |
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/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 3897a5c75ec..9b95ecad274 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,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/commands/user.c,v 1.88 2001/11/02 18:39:57 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.89 2001/11/04 19:55:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,6 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <signal.h> #include <unistd.h> #include "access/heapam.h" @@ -27,6 +26,7 @@ #include "commands/user.h" #include "libpq/crypt.h" #include "miscadmin.h" +#include "storage/pmsignal.h" #include "utils/array.h" #include "utils/builtins.h" #include "utils/fmgroids.h" @@ -180,8 +180,7 @@ write_password_file(Relation rel) /* * Signal the postmaster to reload its password-file cache. */ - if (IsUnderPostmaster) - kill(getppid(), SIGHUP); + SendPostmasterSignal(PMSIGNAL_PASSWORD_CHANGE); } |