]> granicus.if.org Git - postgresql/commit
Improve performance of OverrideSearchPathMatchesCurrent().
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 Nov 2014 17:37:27 +0000 (12:37 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 Nov 2014 17:37:27 +0000 (12:37 -0500)
commit96d66bcfc60d9bcb7db767f23d33abf4d8bc7021
treea707fb3a8fc6bf29ba20aecaaf9f71d9f21d3faa
parente384ed6cdec691e0f7c9a077d0fb2a357763c335
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.
src/backend/catalog/namespace.c