Re: User's responsibility when using a chain of "immutable" functions?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: User's responsibility when using a chain of "immutable" functions?
Дата
Msg-id CAKFQuwaErhPR-i=S1oukUyQ_JA-=SPVVcyjzwBOHiut++KBfjg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: User's responsibility when using a chain of "immutable" functions?  (Bryn Llewellyn <bryn@yugabyte.com>)
Список pgsql-general
On Tuesday, June 28, 2022, Bryn Llewellyn <bryn@yugabyte.com> wrote:

DISCARD PLANS is unsafe in a multi-user concurrent scenario. The doc says explicitly that its scope is just the single session. And it's easy to show the danger by using my testcase manually, step by appropriate step, with two concurrent sessions.

Impractical maybe, but hardly unsafe (well, relative to not doing anything).

 

I've concluded that the only practical practice for "immutable" is to reserve its use for functions that don't mention even a single user-created artifact.

That seems like too strong a position to take for me.  Go ahead and build immutable utility functions.  Just don’t be stupid break your promise.  But even then, there are ways to fix things in case of bugs.
 

David J.

 

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: User's responsibility when using a chain of "immutable" functions?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: User's responsibility when using a chain of "immutable" functions?