Re: plan cache overhead on plpgsql expression
От | Tom Lane |
---|---|
Тема | Re: plan cache overhead on plpgsql expression |
Дата | |
Msg-id | 21557.1585244392@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: plan cache overhead on plpgsql expression (Amit Langote <amitlangote09@gmail.com>) |
Ответы |
Re: plan cache overhead on plpgsql expression
|
Список | pgsql-hackers |
Amit Langote <amitlangote09@gmail.com> writes: > One thing -- I don't get the division between > CachedPlanAllowsSimpleValidityCheck() and CachedPlanIsSimplyValid(). > Maybe I am missing something, but could there not be just one > function, possibly using whether expr_simple_expr is set or not to > skip or do, resp., the checks that the former does? Well, we don't want to do the initial checks over again every time; we want the is-valid test to be as simple and fast as we can make it. I suppose we could have one function with a boolean flag saying "this is a recheck", but I don't find that idea to be any better than the way it is. Also, although the existing structure in plpgsql always calls CachedPlanIsSimplyValid immediately after a successful call to CachedPlanAllowsSimpleValidityCheck, I don't think that's necessarily going to be true for other potential users of the functions. So merging the functions would reduce flexibility. regards, tom lane
В списке pgsql-hackers по дате отправления: