Improve performance of OverrideSearchPathMatchesCurrent().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 96d66bcfc60d9bcb7db767f23d33abf4d8bc7021
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-11-28T17:37:27Z
Releases: 9.5.0
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.

Files

PathChange+/−
src/backend/catalog/namespace.c modified +37 −13