postgresql/src
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
..
backend Avoid searching for callback functions in CallSyscacheCallbacks(). 2017-05-12 19:05:27 -04:00
bin Change CREATE STATISTICS syntax 2017-05-12 14:59:35 -03:00
common Add PQencryptPasswordConn function to libpq, use it in psql and createuser. 2017-05-03 11:19:07 +03:00
fe_utils Allow psql variable substitution to occur in backtick command strings. 2017-04-01 21:44:54 -04:00
include Avoid searching for callback functions in CallSyscacheCallbacks(). 2017-05-12 19:05:27 -04:00
interfaces Restore PGREQUIRESSL recognition in libpq. 2017-05-08 07:24:24 -07:00
makefiles Try to fix non-MSVC Windows builds in the wake of logical replication. 2017-01-20 12:51:31 -05:00
pl Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
port Run the postmaster's signal handlers without SA_RESTART. 2017-04-24 13:00:30 -04:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Fix dependencies for extended statistics objects. 2017-05-12 16:26:31 -04:00
timezone Guard against null t->tm_zone in strftime.c. 2017-05-07 12:33:12 -04:00
tools Honor PROVE_FLAGS environment setting 2017-05-12 11:11:49 -04:00
tutorial Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
.gitignore
DEVELOPERS
Makefile Remove redundant coverage target 2017-02-17 08:56:57 -05:00
Makefile.global.in Honor PROVE_FLAGS environment setting 2017-05-12 11:11:49 -04:00
Makefile.shlib Remove support for bcc and msvc standalone libpq builds 2017-04-11 15:22:21 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00