cannot start commands during a parallel operation

Justin Pryzby pryzby at telsasoft.com
Fri Aug 9 13:40:43 PDT 2024


On Fri, Aug 09, 2024 at 01:19:22PM -0700, Paul Ramsey wrote:
> Where’s the PostGIS content to this? The stack trace doesn’t hit and PostGIS code, and the SQL doesn’t call any PostGIS functions…?

Our get_x() calls postgis st_x().

ts=# \sf st_x
CREATE OR REPLACE FUNCTION public.st_x(geometry)
 RETURNS double precision
 LANGUAGE c
 IMMUTABLE PARALLEL SAFE STRICT
AS '$libdir/postgis-3', $function$LWGEOM_x_point$function$

ts=# begin; SET parallel_tuple_cost=0; SET parallel_setup_cost=0; CREATE TABLE rpt AS SELECT get_x(site_id, site_alias) FROM sites; rollback;                                                                                      
ts=# \errverbose                                                                                                                                                                                                                   
ERROR:  XX000: cannot start commands during a parallel operation                                                                                                                                                                   
CONTEXT:  SQL statement "select st_x(site_geo) AS x          from sites where site_id = s_id"                                                                                                                                      
PL/pgSQL function get_x(integer,integer) line 7 at SQL statement                                                                                                                                                                   
LOCATION:  CommandCounterIncrement, xact.c:1094                                                                                                                                                                                    


More information about the postgis-devel mailing list