pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid searching for callback functions in CallSyscacheCallbacks(
4+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid searching for callback functions in CallSyscacheCallbacks(
@ 2017-05-12 23:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2017-05-12 23:05 UTC (permalink / raw)
  To: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2df5d465558b6f17c161cbbe246b050b453ec99c

Modified Files
--------------
src/backend/utils/cache/inval.c    | 39 ++++++++++++++++++++++++++++++++++----
src/backend/utils/cache/syscache.c |  5 +++--
src/include/utils/syscache.h       |  2 ++
3 files changed, 40 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid searching for callback functions in CallSyscacheCallbacks(
@ 2017-05-12 23:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2017-05-12 23:05 UTC (permalink / raw)
  To: pgsql-committers

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d0755dc32a03278077c00aea60638c4efbb404ae

Modified Files
--------------
src/backend/utils/cache/inval.c    | 39 ++++++++++++++++++++++++++++++++++----
src/backend/utils/cache/syscache.c |  5 +++--
src/include/utils/syscache.h       |  2 ++
3 files changed, 40 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid searching for callback functions in CallSyscacheCallbacks(
@ 2017-05-12 23:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2017-05-12 23:05 UTC (permalink / raw)
  To: pgsql-committers

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e7955ac6481b5948a05b076222be50749f85bdb2

Modified Files
--------------
src/backend/utils/cache/inval.c    | 39 ++++++++++++++++++++++++++++++++++----
src/backend/utils/cache/syscache.c |  5 +++--
src/include/utils/syscache.h       |  2 ++
3 files changed, 40 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid searching for callback functions in CallSyscacheCallbacks(
@ 2017-05-12 23:05 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2017-05-12 23:05 UTC (permalink / raw)
  To: pgsql-committers

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

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/32900700f4f5f373fb5ea9844b979a17bf6570a6

Modified Files
--------------
src/backend/utils/cache/inval.c    | 39 ++++++++++++++++++++++++++++++++++----
src/backend/utils/cache/syscache.c |  5 +++--
src/include/utils/syscache.h       |  2 ++
3 files changed, 40 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-05-12 23:05 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 23:05 pgsql: Avoid searching for callback functions in CallSyscacheCallbacks( Tom Lane <tgl@sss.pgh.pa.us>
2017-05-12 23:05 pgsql: Avoid searching for callback functions in CallSyscacheCallbacks( Tom Lane <tgl@sss.pgh.pa.us>
2017-05-12 23:05 pgsql: Avoid searching for callback functions in CallSyscacheCallbacks( Tom Lane <tgl@sss.pgh.pa.us>
2017-05-12 23:05 pgsql: Avoid searching for callback functions in CallSyscacheCallbacks( Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox