On Tue, May 14, 2013 at 12:51 AM, Michael Paquier <michael.paqu...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers