[postgis-tickets] [PostGIS] #4129: Cannot update SecondarySnapshot during a parallel operation

PostGIS trac at osgeo.org
Thu Jul 19 01:06:40 PDT 2018


#4129: Cannot update SecondarySnapshot during a parallel operation
---------------------+----------------------------------------
  Reporter:  davidp  |      Owner:  Bborie Park
      Type:  defect  |     Status:  new
  Priority:  high    |  Milestone:  PostGIS 2.4.5
 Component:  raster  |    Version:  2.4.x
Resolution:          |   Keywords:  SecondarySnapshot parallel
---------------------+----------------------------------------
Changes (by Algunenano):

 * owner:  pramsey => Bborie Park
 * component:  postgis => raster


Comment:

 This looks like there is some Postgis function marked as PARALLEL SAFE
 when it isn't.

 `ST_Transform` might execute a query like the one you've posted above, but
 it's read only and doesn't do anything strange so it should be ok.

 On the other hand `ST_Intersects(geometry, raster)` is defined as:
 {{{
 CREATE OR REPLACE FUNCTION _st_intersects(geom geometry, rast raster,
 nband integer DEFAULT NULL)
         RETURNS boolean AS $$
         DECLARE
                 hasnodata boolean := TRUE;
                 _geom geometry;
         BEGIN
                 IF ST_SRID(rast) != ST_SRID(geom) THEN
                         RAISE EXCEPTION 'Raster and geometry do not have
 the same SRID';
                 END IF;

                 _geom := ST_ConvexHull(rast);
 ...
 }}}

 And if we look at ST_ConverHull(raster) it is missing the parallel
 declaration:
 {{{
 -- Availability: 2.0.0
 -- Changed: 2.1.4 raised cost
 -- used to cast raster -> geometry
 CREATE OR REPLACE FUNCTION st_convexhull(raster)
     RETURNS geometry
     AS 'MODULE_PATHNAME','RASTER_convex_hull'
     LANGUAGE 'c' IMMUTABLE STRICT
     COST 300;
 }}}
 This means that, by default rules, it's parallel unsafe, which makes
 anyone using it also unsafe. Now, I don't know if the parallelism
 declaration is missing or it really is unsafe, but that's where I would
 start looking into.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4129#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list