Re: Why overhead of SPI is so large? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why overhead of SPI is so large?
Date
Msg-id 18739.1574281104@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why overhead of SPI is so large?  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Why overhead of SPI is so large?  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> At Tue, 12 Nov 2019 11:27:24 +0300, Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote in
>> In my opinion contain_mutable_functions() is the best solution.
>> But if it is not acceptable, I will rewrite the patch in white-list
>> fashion.

> I agree for just relying on contain_mutable_functions for the same
> reasons to Tom.

I've set the CF entry to "Waiting on Author" pending a new patch
that does it like that.

>> I do not understand the argument about expensive
>> is-it-in-the-pg_catalog-schema test.
>> IsCatalogNameaspace is doing just simple comparison without any
>> catalog lookups:

As far as that goes, get_func_namespace() is the expensive part,
not IsCatalogNamespace().  If we were going to go down this path,
it'd perhaps be worthwhile to expand that and the adjacent
func_volatile() test into bulkier code that just does one syscache
fetch of the pg_proc row.  But we're not, so it's moot.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: range_agg
Next
From: Xun Cheng
Date:
Subject: Re: why doesn't optimizer can pull up where a > ( ... )