Changes between Initial Version and Version 1 of Ticket #4129, comment 2


Ignore:
Timestamp:
07/19/18 01:44:53 (6 years ago)
Author:
davidp

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4129, comment 2

    initial v1  
    55I didn't thing so... PARALLEL UNSAFE apply only downstream (by my observations). So, function marked as parallel safe is executed in parallel mode, even if internally calls parallel unsafe function. Contrary, parallel unsafe function never executes in parallel mode, no matter how internally called functions are labeled.
    66
     7Ind in our DB, functions are declared as follows:
     8
     9{{{
     10CREATE OR REPLACE FUNCTION public._st_intersects(geom geometry, rast raster, nband integer DEFAULT NULL::integer)
     11 RETURNS boolean
     12 LANGUAGE plpgsql
     13 IMMUTABLE PARALLEL SAFE COST 1000
     14 ...
     15}}}
     16
     17and
     18
     19
     20{{{
     21CREATE OR REPLACE FUNCTION public.st_intersects(geom geometry, rast raster, nband integer DEFAULT NULL::integer)
     22 RETURNS boolean
     23 LANGUAGE sql
     24 IMMUTABLE PARALLEL SAFE COST 1000
     25AS $function$ SELECT $1 OPERATOR(public.&&) $2::geometry AND public._st_intersects($1, $2, $3); $function$
     26
     27}}}
     28
     29
     30
     31
    732And one correction to my original post... function default is PARALLEL UNSAFE, not RESTRICTED. Sorry, my fault.