TransWikia.com

Can't DropTopology due to event trigger

Geographic Information Systems Asked by atlas cube on February 26, 2021

I have a postgres database with one table for each US state. I am trying to make a program which iterates through each of the tables and manipulates the geometry. To do this, at the beginning of the loop I am creating a topology with the line

SELECT topology.CreateTopology('state_topo', find_srid('schema', 'stateTable', ''geom''));

Since I’m iterating I want to delete the topology before restarting, so I’ve included the line:

SELECT topology.DropTopology(''state_topo'');

The program works fine with just one state table, however when there are multiple I get the following error:

ERROR: cannot DROP TABLE "edge_data" because it has pending trigger events
CONTEXT: SQL statement "DROP SCHEMA state_topo CASCADE"

How do I fix this bug?

One Answer

Received same frustrating error, issue unclear.

Dropper entire extension no solution. Terminated all "QGIS" connections, and drop finally worked.

Cannot replicate.

Theory: In my case the drop happen during a transaction that drop and recreate a topo schema in conjunction with a geoprocessing error, raising some step later the drop, trapped in a BEGIN/EXCEPTION/END control structure. Suspect that the chain event related to a drop that runs during the transaction are affected by the error that rollback same transaction... ????

Facts: QGIS usually place locks connections that can cause deadlocks on pg instances. In some envs I'm constrained to have checking and terminate some of those connections.

There are some similarity with your case?

Thanks.

Answered by LittleEaster on February 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP