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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: Christophe Pettus <xof(at)thebuild(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: User's responsibility when using a chain of "immutable" functions?
Date: 2022-06-29 05:02:32
Message-ID: CAKFQuwaErhPR-i=S1oukUyQ_JA-=SPVVcyjzwBOHiut++KBfjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, June 28, 2022, Bryn Llewellyn <bryn(at)yugabyte(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-06-29 05:46:02 Re: User's responsibility when using a chain of "immutable" functions?
Previous Message Pavel Stehule 2022-06-29 04:34:31 Re: User's responsibility when using a chain of "immutable" functions?