Bug report #17006

Error when trying to save edit done on a layer « updatefeature » already exists

Added by Nicolas Rochard over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Affected QGIS version:2.18.11 Regression?:No
Operating System:Linux openSUSE Leap / Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:Yes Copied to github as #:24905

Description

--
PostGIS Version is 2.3.3 and PostGreSQL 9.4.6
QGIS 2.18.10 and 2.18.11
--

Layer are store into a PostGIS editing.
This bug has been observed when several people work on same layer AND also if only one people is working on a layer.

When trying to save modification make on a layer, QGIS cannot save and display following message :
Unable to validate modification.
Error : provider error
Error PostGIS while editing modification : ERROR prepare instruction "updatefeature" already exists

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback

Why "crashes qgis or corrupts the data"? because when discarding the edits (after the error) there is data loss?
can you post a dump of this layer?

#2 Updated by Nicolas Rochard over 6 years ago

Giovanni Manghi wrote:

Why "crashes qgis or corrupts the data"? because when discarding the edits (after the error) there is data loss?
can you post a dump of this layer?

Sure, please find a dump here : https://framadrop.org/r/gB9_lndhIi#eyoFYe23vUaMXrd4qLHcfMGNK7ER0UqFNJHMN9p9Qhg=

#3 Updated by Giovanni Manghi over 6 years ago

Nicolas Rochard wrote:

Giovanni Manghi wrote:

Why "crashes qgis or corrupts the data"? because when discarding the edits (after the error) there is data loss?
can you post a dump of this layer?

Sure, please find a dump here : https://framadrop.org/r/gB9_lndhIi#eyoFYe23vUaMXrd4qLHcfMGNK7ER0UqFNJHMN9p9Qhg=

I'm not able to do a clean restore:

...
...
...
psql:error_update_feature.sql:7113: invalid command \N
psql:error_update_feature.sql:7114: invalid command \N
psql:error_update_feature.sql:7115: invalid command \.
psql:error_update_feature.sql:7124: ERROR: syntax error at or near "7059"
LINE 1: 7059 0106000020DB0B000001000000010300000001000000050000002A7...
^
psql:error_update_feature.sql:7133: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7141: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7150: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7151: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7152: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7153: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7154: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist

#4 Updated by Nicolas Rochard over 6 years ago

Sorry for that.

Try this dump : https://framadrop.org/r/mg8qRx0YhB#buL/DjGRiBCysR1G8cGyWR55DbUR+PRC9Yio/E3lLb8=
Perhaps you will need to create a schema call urban_atlas_2012

Note : this dump was made with PostGreSQL 9.6
I've try to update my database version but I still got this problem.

Giovanni Manghi wrote:

Nicolas Rochard wrote:

Giovanni Manghi wrote:

Why "crashes qgis or corrupts the data"? because when discarding the edits (after the error) there is data loss?
can you post a dump of this layer?

Sure, please find a dump here : https://framadrop.org/r/gB9_lndhIi#eyoFYe23vUaMXrd4qLHcfMGNK7ER0UqFNJHMN9p9Qhg=

I'm not able to do a clean restore:

...
...
...
psql:error_update_feature.sql:7113: invalid command \N
psql:error_update_feature.sql:7114: invalid command \N
psql:error_update_feature.sql:7115: invalid command \.
psql:error_update_feature.sql:7124: ERROR: syntax error at or near "7059"
LINE 1: 7059 0106000020DB0B000001000000010300000001000000050000002A7...
^
psql:error_update_feature.sql:7133: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7141: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7150: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7151: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7152: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7153: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist
psql:error_update_feature.sql:7154: ERROR: relation "RS016L1_SMEDEREVO_CAPI" does not exist

#5 Updated by Giovanni Manghi over 6 years ago

Nicolas Rochard wrote:

Sorry for that.

Try this dump : https://framadrop.org/r/mg8qRx0YhB#buL/DjGRiBCysR1G8cGyWR55DbUR+PRC9Yio/E3lLb8=
Perhaps you will need to create a schema call urban_atlas_2012

I was able to restore on postgresql 9.6 instance.
Had no issues whatsoever in editing and saving changes to the layer. I cannot test the many users scenario.

#6 Updated by Nicolas Rochard over 6 years ago

I understand your position.
On a week of editing same data, it happen only few times but I cannot find any common way to reproduce it.
It's always same operation : people use a plugin that load layer and imagery related to the area and code with UI for custom form...
But sometimes, update not working. Could it be due to autovaccum or some background PostGreSQL process ? Whatever it may be there's no trigger function on this project.

Giovanni Manghi wrote:

Nicolas Rochard wrote:

Sorry for that.

Try this dump : https://framadrop.org/r/mg8qRx0YhB#buL/DjGRiBCysR1G8cGyWR55DbUR+PRC9Yio/E3lLb8=
Perhaps you will need to create a schema call urban_atlas_2012

I was able to restore on postgresql 9.6 instance.
Had no issues whatsoever in editing and saving changes to the layer. I cannot test the many users scenario.

#7 Updated by Giovanni Manghi over 6 years ago

On a week of editing same data, it happen only few times but I cannot find any common way to reproduce it.

if there is no way to reliably replicate an issue and/or if it happens very rarely and/or if is not clear at all if is QGIS issue I think is useless to keep the ticket open. If you will find a way to replicate and the culprit is qgis you/we can always reopen it. Agree?

#8 Updated by Nicolas Rochard over 6 years ago

Giovanni Manghi wrote:

On a week of editing same data, it happen only few times but I cannot find any common way to reproduce it.

if there is no way to reliably replicate an issue and/or if it happens very rarely and/or if is not clear at all if is QGIS issue I think is useless to keep the ticket open. If you will find a way to replicate and the culprit is qgis you/we can always reopen it. Agree?

I wish you could understand and identify why QGIS display that error message. That's make sense to close for now.
Thanks for taking time to try to help me.

#9 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to not reproducable
  • Status changed from Feedback to Closed

Also available in: Atom PDF