Re: Parallel Sort - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Parallel Sort
Date
Msg-id CA+TgmobustvJgxyKNityCqOZQrThTQvDMs76FXvxoyquPtQ6Ww@mail.gmail.com
Whole thread Raw
In response to Re: Parallel Sort  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Tue, May 14, 2013 at 12:51 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
>> I'm not sure what the specific answer here should look like.  Simply
>> having a
>> CREATE FUNCTION ... PARALLEL_IS_FINE flag is not entirely satisfying,
>> because
>> the rules are liable to loosen over time.
>
> Having a flag would be enough to control parallelism, but cannot we also
> determine if
> the execution of a function can be shipped safely to a worker based on its
> volatility
> only? Immutable functions are presumably safe as they do not modify the
> database state
> and give always the same result, volatile and stable functions are
> definitely not safe.
> For such reasons, it would be better to keep things simple and rely on
> simple rules to
> determine if a given expression can be executed safely on a backend worker.

In the part of the text you didn't quote, Noah explained why not all
immutable functions are parallel-safe.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: erroneous restore into pg_catalog schema
Next
From: Alexander Korotkov
Date:
Subject: Re: Cube extension improvement, GSoC