cannot start commands during a parallel operation

Paul Ramsey pramsey at cleverelephant.ca
Fri Aug 9 13:43:22 PDT 2024



> On Aug 9, 2024, at 1:40 PM, Justin Pryzby <pryzby at telsasoft.com> wrote:
> 
> 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().

And get_x() also does a transform along the way? Crazy that st_x() could cause any problems, it’s so simple.

P

> 
> 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