pgsql: Improve performance of OverrideSearchPathMatchesCurrent().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve performance of OverrideSearchPathMatchesCurrent().
Date: 2014-11-28 17:37:40
Message-ID: E1XuPUC-0001Qn-A8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve performance of OverrideSearchPathMatchesCurrent().

This function was initially coded on the assumption that it would not be
performance-critical, but that turns out to be wrong in workloads that
are heavily dependent on the speed of plpgsql functions. Speed it up by
hard-coding the comparison rules, thereby avoiding palloc/pfree traffic
from creating and immediately freeing an OverrideSearchPath object.
Per report from Scott Marlowe.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/96d66bcfc60d9bcb7db767f23d33abf4d8bc7021

Modified Files
--------------
src/backend/catalog/namespace.c | 50 +++++++++++++++++++++++++++++----------
1 file changed, 37 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-11-28 18:37:32 pgsql: Add bms_next_member(), and use it where appropriate.
Previous Message Tom Lane 2014-11-28 17:19:24 pgsql: Improve typcache: cache negative lookup results, add invalidatio