Re: IMMUTABLE and PARALLEL SAFE function markings - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: IMMUTABLE and PARALLEL SAFE function markings
Date
Msg-id 20181127003918.GP3415@tamriel.snowman.net
Whole thread Raw
In response to Re: IMMUTABLE and PARALLEL SAFE function markings  (Vik Fearing <vik.fearing@2ndquadrant.com>)
List pgsql-hackers
Greetings,

* Vik Fearing (vik.fearing@2ndquadrant.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

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: IMMUTABLE and PARALLEL SAFE function markings
Next
From: Tom Lane
Date:
Subject: Re: IMMUTABLE and PARALLEL SAFE function markings