Re: IMMUTABLE and PARALLEL SAFE function markings

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Gajus Kuizinas <gajus(at)gajus(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: IMMUTABLE and PARALLEL SAFE function markings
Date: 2018-11-27 00:39:18
Message-ID: 20181127003918.GP3415@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Vik Fearing (vik(dot)fearing(at)2ndquadrant(dot)com) wrote:
> On 27/11/2018 01:13, Stephen Frost wrote:
> > Parallel safe functions should be marked as such. Immutable functions
> > should be marked as such. We should not assume that one implies the
> > other, nor should we operate as if they do.
>
> Yes we should! Unless you can produce a case where an immutable
> function is not parallel safe.

What's the advantage of running a function that isn't marked as parallel
safe in a parallel worker because it's marked as immutable?

Seems like the only thing we're doing is making assumptions about what
the user meant when they've clearly told us something different and that
just strikes me as both a bad idea and an unnecessary complication of
the code.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-11-27 00:40:13 Re: IMMUTABLE and PARALLEL SAFE function markings
Previous Message Tom Lane 2018-11-27 00:34:15 Re: IMMUTABLE and PARALLEL SAFE function markings