Re: [HACKERS] plpgsql, caching, resowners and jit

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] plpgsql, caching, resowners and jit
Дата
Msg-id 806.1495478410@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] plpgsql, caching, resowners and jit  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> After doing so, I got pretty weird crashes.  A bit of debugging later it
> became apparent that the issue is in how plpgsql caches expression
> states: ...
> which means we'll re-use ExprStates built in another subtransaction.

Sure, why not?  They generally aren't going to change across
subtransactions.

I do not recall that there's a separate resowner for those things
though.  Usually the idea for ExprState-related resources is to
clean them up in an ExprContextCallback, cf executor/functions.c.
Might work better if you attack it that way instead of via a resowner.

Or maybe we could set up a separate resowner for plpgsql's simple
expression states.  Not sure what consequences that would have,
but it doesn't seem unreasonable on its face.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeremy Finzel
Дата:
Сообщение: [HACKERS] Is it possible to get query_string value in an event trigger?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] psql - add special variable to reflect the last query status