Changes between Initial Version and Version 1 of Ticket #4129, comment 2
- Timestamp:
- 07/19/18 01:44:53 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4129, comment 2
initial v1 5 5 I 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. 6 6 7 Ind in our DB, functions are declared as follows: 8 9 {{{ 10 CREATE 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 17 and 18 19 20 {{{ 21 CREATE 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 25 AS $function$ SELECT $1 OPERATOR(public.&&) $2::geometry AND public._st_intersects($1, $2, $3); $function$ 26 27 }}} 28 29 30 31 7 32 And one correction to my original post... function default is PARALLEL UNSAFE, not RESTRICTED. Sorry, my fault.