Bug report #21802

Overwrite of layer within Geopackage does not trigger updates/cleanups/maintenance as it should

Added by Brett Carlock over 4 years ago. Updated over 4 years ago.

Category:Data Provider
Affected QGIS version:3.6.1 Regression?:No
Operating System:Win10 x64 Pro (1809 Build 17763.404) Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29617


Have layer in geopackage with Number of Features X (1253, for example), with a given geometric extent.

Replace layer in geopackage with another version, choose overwrite layer. New version has Number of Features 18071, given geometric extent is now larger in area than it was originally.

Toggle Show Feature Count On/Off. Count does not update to reflect new reality of the source data.
Correct object count is shown on Attribute Table, however.

QGIS visualizes only the original extent and representation of features. All of the new features are not visible, selectable (by map), etc. They are represented properly in the attribute table, however.

Right click layer, properties, Source, click Create Spatial Index, click Update Extents, click Ok/Apply.
Layer is now at the full extent, now shows visually all newly updated features.

Show Feature Count is still incorrect, however.

These operations should be completed automatically by the database/QGIS when such changes occur to prevent the perception of a broken layer/datasource when the underlying data is fine, just out of sync with the database's cache/optimizations.


#1 Updated by Giovanni Manghi over 4 years ago

  • Status changed from Open to Feedback

I believe that this is more general, so #21814 could be closed.

Also available in: Atom PDF