[Geoserver-devel] [JIRA] (GEOS-10500) WFS-T unable to delete more than 30 features in a single transaction when the data source is PostGIS

papaya created an issue

GeoServer / BugGEOS-10500

WFS-T unable to delete more than 30 features in a single transaction when the data source is PostGIS

Issue Type:

BugBug

Affects Versions:

2.20.4

Assignee:

Unassigned

Components:

PostGIS, Transactions/Locking, WFS

Created:

20/May/22 8:27 AM

Environment:

Geoserver: 2.20.4

PostgreSQL: 11.15

PostGIS: 3.2.1

Priority:

MediumMedium

Reporter:

papaya

If the data source is PostGIS, when WFS-T batch deletes more than 30 features in a single transaction, the Geoserver has no response. The WFS-T request would be timeout, and the features would not be deleted.<br>

Test method is as follows:<br>

  1. create database table:<br>
BEGIN;
CREATE TABLE "public"."facilities" ( "feat_id" VARCHAR(80), CONSTRAINT "facilities_pk" PRIMARY KEY ("feat_id") );
SELECT AddGeometryColumn('public','facilities','geometry',4326,'POINT',2);
CREATE INDEX "facilities_geometry_geom_idx" ON "public"."facilities" USING GIST ("geometry");
ALTER TABLE "public"."facilities" ADD COLUMN "feat_type" NUMERIC(18,0);
ALTER TABLE "public"."facilities" ADD COLUMN "sub_type" NUMERIC(18,0);
ALTER TABLE "public"."facilities" ADD COLUMN "desc" VARCHAR(80);
COMMIT;
  1. publish a Layer on the Geoserver, the configuration is as follows:<br>

workspace name: postgres<br>

namespace URI: http://geoserver/postgres <br>

datastore name: public<br>

datastore Linked database public schemas<br>

Enable preparedStatements<br>

layer name: public.facilities<br>

  1. insert 30 features:<br>

The format of the request is as follows, and the full request is attached.‘insert_request.xml’<br>

&lt;Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"&gt;
    &lt;Insert idgen="UseExisting"&gt;
        &lt;public.facilities xmlns="http://geoserver/postgres" fid="1"&gt;
            &lt;geometry&gt;
                &lt;Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326"&gt;
                    &lt;pos srsDimension="2"&gt;122.05334646900725 31.503026716605195&lt;/pos&gt;
                &lt;/Point&gt;
            &lt;/geometry&gt;
        &lt;/public.facilities&gt;
    &lt;/Insert&gt;
    &lt;Insert idgen="UseExisting"&gt;
        &lt;public.facilities xmlns="http://geoserver/postgres" fid="2"&gt;
            &lt;geometry&gt;
                &lt;Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326"&gt;
                    &lt;pos srsDimension="2"&gt;122.05334646900725 31.503026716605195&lt;/pos&gt;
                &lt;/Point&gt;
            &lt;/geometry&gt;
        &lt;/public.facilities&gt;
    &lt;/Insert&gt;
&lt;/Transaction&gt;
  1. delete 30 features:<br>

The format of the request is as follows, and the full request is attached.‘delete_request.xml’<br>

&lt;Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"&gt;
    &lt;Delete typeName="feature:public.facilities" xmlns:feature="http://geoserver/postgres"&gt;
        &lt;Filter xmlns="http://www.opengis.net/ogc"&gt;
            &lt;FeatureId fid="1"/&gt;
        &lt;/Filter&gt;
    &lt;/Delete&gt;
    &lt;Delete typeName="feature:public.facilities" xmlns:feature="http://geoserver/postgres"&gt;
        &lt;Filter xmlns="http://www.opengis.net/ogc"&gt;
            &lt;FeatureId fid="2"/&gt;
        &lt;/Filter&gt;
    &lt;/Delete&gt;
&lt;/Transaction&gt;

and then, Geoserver has no response.<br>

I’ve tried these things:<br>

  1. Inserts and updates don’t have this problem.<br>
  2. When the data source is Shapefile, don’t have this problem.<br>

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100198-sha1:0f60739)

Atlassian logo