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

From Vik Fearing
Subject Re: IMMUTABLE and PARALLEL SAFE function markings
Date
Msg-id 819198a9-3f5c-4746-797f-f7cf76231f01@2ndquadrant.com
Whole thread Raw
In response to Re: IMMUTABLE and PARALLEL SAFE function markings  (Stephen Frost <sfrost@snowman.net>)
Responses Re: IMMUTABLE and PARALLEL SAFE function markings
List pgsql-hackers
On 27/11/2018 01:14, Stephen Frost wrote:
> Greetings,
>
> * Vik Fearing (vik.fearing@2ndquadrant.com) wrote:
>> On 27/11/2018 01:10, Stephen Frost wrote:
>>> * Vik Fearing (vik.fearing@2ndquadrant.com) wrote:
>>>> On 27/11/2018 01:05, Stephen Frost wrote:
>>>>> That said, I do *not* think we should make any assumptions here- users
>>>>> incorrectly mark things all the time but we shouldn't encourage that and
>>>>> we shouldn't assume that functions marked as immutable are parallel
>>>>> safe.
>>>>
>>>> Does that mean we also shouldn't assume that functions marked as
>>>> immutable are index safe?
>>>
>>> We've got an index safe flag?
>>
>> Yes.  It's called provolatile='i'.
>
> ... and we complain if someone tries to use a provolatile <> 'i'
> function directly in an index, so not sure what you're getting at here?

I'm getting at we should do the same for parallel safety checks.

If it's immutable, it's safe.
If it's not immutable, check if it's safe.
--
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: IMMUTABLE and PARALLEL SAFE function markings
Next
From: Vik Fearing
Date:
Subject: Re: IMMUTABLE and PARALLEL SAFE function markings