postgresql/src/backend/utils/cache
Tom Lane fad153ec45 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.
2008-06-19 21:32:56 +00:00
..
catcache.c Improve our #include situation by moving pointer types away from the 2008-06-19 00:46:06 +00:00
inval.c Rewrite the sinval messaging mechanism to reduce contention and avoid 2008-06-19 21:32:56 +00:00
lsyscache.c Since createplan.c no longer cares whether index operators are lossy, it has 2008-04-13 20:51:21 +00:00
Makefile Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
plancache.c Improve snapshot manager by keeping explicit track of snapshots. 2008-05-12 20:02:02 +00:00
relcache.c Restructure some header files a bit, in particular heapam.h, by removing some 2008-05-12 00:00:54 +00:00
syscache.c Improve our #include situation by moving pointer types away from the 2008-06-19 00:46:06 +00:00
ts_cache.c Create new routines systable_beginscan_ordered, systable_getnext_ordered, 2008-04-12 23:14:21 +00:00
typcache.c Improve our #include situation by moving pointer types away from the 2008-06-19 00:46:06 +00:00