diff options
| author | Tom Lane | 2008-06-19 21:32:56 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-06-19 21:32:56 +0000 |
| commit | fad153ec45299bd4d4f29dec8d9e04e2f1c08148 (patch) | |
| tree | 9a1335bb5b2fe5bbe9d1b4d405c8da03d004afc4 /src/include/storage/pmsignal.h | |
| parent | 30dc388a0dd9ceca911b101fe1877cf7a23776fa (diff) | |
Rewrite the sinval messaging mechanism to reduce contention and avoid
unnecessary cache resets. The major changes are:
* When the queue overflows, we only issue a cache reset to the specific
backend or backends that still haven't read the oldest message, rather
than resetting everyone as in the original coding.
* When we observe backend(s) falling well behind, we signal SIGUSR1
to only one backend, the one that is furthest behind and doesn't already
have a signal outstanding for it. When it finishes catching up, it will
in turn signal SIGUSR1 to the next-furthest-back guy, if there is one that
is far enough behind to justify a signal. The PMSIGNAL_WAKEN_CHILDREN
mechanism is removed.
* We don't attempt to clean out dead messages after every message-receipt
operation; rather, we do it on the insertion side, and only when the queue
fullness passes certain thresholds.
* Split SInvalLock into SInvalReadLock and SInvalWriteLock so that readers
don't block writers nor vice versa (except during the infrequent queue
cleanout operations).
* Transfer multiple sinval messages for each acquisition of a read or
write lock.
Diffstat (limited to 'src/include/storage/pmsignal.h')
| -rw-r--r-- | src/include/storage/pmsignal.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/storage/pmsignal.h b/src/include/storage/pmsignal.h index c02593e5a86..94f1770ffce 100644 --- a/src/include/storage/pmsignal.h +++ b/src/include/storage/pmsignal.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/pmsignal.h,v 1.19 2008/01/01 19:45:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/pmsignal.h,v 1.20 2008/06/19 21:32:56 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -23,7 +23,6 @@ typedef enum { PMSIGNAL_PASSWORD_CHANGE, /* pg_auth file has changed */ - PMSIGNAL_WAKEN_CHILDREN, /* send a SIGUSR1 signal to all backends */ PMSIGNAL_WAKEN_ARCHIVER, /* send a NOTIFY signal to xlog archiver */ PMSIGNAL_ROTATE_LOGFILE, /* send SIGUSR1 to syslogger to rotate logfile */ PMSIGNAL_START_AUTOVAC_LAUNCHER, /* start an autovacuum launcher */ |
