Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, June 28, 2022, Bryn Llewellyn <bryn@xxxxxxxxxxxx> 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.

 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux