postgresql/src/backend
Tom Lane 2df5d46555 Avoid searching for callback functions in CallSyscacheCallbacks().
We have now grown enough registerable syscache-invalidation callback
functions that the original assumption that there would be few of them
is causing performance problems.  In particular, let's fix things so that
CallSyscacheCallbacks doesn't have to search the whole array to find
which callback(s) to invoke for a given cache ID.  Preserve the original
behavior that callbacks are called in order of registration, just in
case there's someplace that depends on that (which I doubt).

In support of this, export the number of syscaches from syscache.h.
People could have found that out anyway from the enum, but adding a
#define makes that much safer.

This provides a useful additional speedup in Mathieu Fenniak's
logical-decoding test case, although we're reaching the point of
diminishing returns there.  I think any further improvement will have
to come from reducing the number of cache invalidations that are
triggered in the first place.  Still, we can hope that this change
gives some incremental benefit for all invalidation scenarios.

Back-patch to 9.4 where logical decoding was introduced.

Discussion: https://postgr.es/m/CAHoiPjzea6N0zuCi=+f9v_j94nfsy6y8SU7-=bp4=7qw6_i=Rg@mail.gmail.com
2017-05-12 19:05:27 -04:00
..
access Standardize "WAL location" terminology 2017-05-12 13:51:27 -04:00
bootstrap Use one transaction while reading postgres.bki, not one per line. 2017-04-14 17:51:25 -04:00
catalog getObjectDescription: support extended statistics 2017-05-12 19:22:50 -03:00
commands Fix dependencies for extended statistics objects. 2017-05-12 16:26:31 -04:00
executor Fix typos in comments. 2017-05-09 23:40:08 -04:00
foreign Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
lib Revert "Permit dump/reload of not-too-large >1GB tuples" 2017-05-10 18:41:27 -03:00
libpq Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Change CREATE STATISTICS syntax 2017-05-12 14:59:35 -03:00
optimizer Reduce semijoins with unique inner relations to plain inner joins. 2017-05-01 14:53:42 -04:00
parser Change CREATE STATISTICS syntax 2017-05-12 14:59:35 -03:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Provide a way to control SysV shmem attach address in EXEC_BACKEND builds. 2017-04-15 17:27:38 -04:00
postmaster Replace "transaction log" with "write-ahead log" 2017-05-12 11:52:43 -04:00
regex Fix regexport.c to behave sanely with lookaround constraints. 2017-04-13 17:18:35 -04:00
replication Standardize "WAL location" terminology 2017-05-12 13:51:27 -04:00
rewrite RLS: Fix ALL vs. SELECT+UPDATE policy usage 2017-05-06 21:46:35 -04:00
snowball Add ICU_FLAGS to one more place 2017-03-23 16:53:10 -04:00
statistics extstats: change output functions to emit valid JSON 2017-05-02 18:49:32 -03:00
storage Cope with glibc too old to have epoll_create1(). 2017-04-27 17:13:53 -04:00
tcop Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
tsearch Full Text Search support for json and jsonb 2017-03-31 14:26:03 -04:00
utils Avoid searching for callback functions in CallSyscacheCallbacks(). 2017-05-12 19:05:27 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
common.mk ICU support 2017-03-23 15:28:48 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00