Re: When deleting the plpgsql function, release the CachedPlan of the function
От | Tom Lane |
---|---|
Тема | Re: When deleting the plpgsql function, release the CachedPlan of the function |
Дата | |
Msg-id | 420591.1755535115@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: When deleting the plpgsql function, release the CachedPlan of the function (Matthias van de Meent <boekewurm+postgres@gmail.com>) |
Ответы |
Re: When deleting the plpgsql function, release the CachedPlan of the function
|
Список | pgsql-hackers |
Matthias van de Meent <boekewurm+postgres@gmail.com> writes: > I'm trying to figure out how this patch is supposed to handle > concurrent sessions dropping a procedure that has cached plans. It doesn't, which is (one reason) why it's just a crude hack. A more appropriate solution would be to make plpgsql install a shared-cache-invalidation callback that would watch for invalidations on pg_proc and mark relevant function trees as deletable. It couldn't necessarily delete them right away, since they might be in use at the moment the inval event arrives. (That is, an inval might just indicate an update not a delete. But flushing the function tree would be OK in either case.) I wonder if we could make src/backend/utils/cache/funccache.c handle this, so that SQL functions could also benefit without duplicated logic. regards, tom lane
В списке pgsql-hackers по дате отправления: