[gdal-dev] ogr2ogr - exclude table option?

Even Rouault even.rouault at spatialys.com
Wed Nov 30 12:24:47 PST 2016


On mercredi 30 novembre 2016 21:11:14 CET Andreas Neumann wrote:
> Hi Even,
> 
> Thanks. I will use the 'ogrinfo your.gpkg -sql "DROP TABLE table_name"'
> trick for now.
> 
> One thing though: I noticed that the filesize doesn't really shrink. Is
> there a way to compact/vacuum the geopackage after removal of the table?

You actually mentionned the appropriate SQL command: VACUUM :-)

I've just added this new paragraph to http://gdal.org/drv_geopackage.html:

"""When dropping a table, or removing records from tables, the space they
occupied is not immediately released and kept in the pool of file pages that
SQLite may reuse later. If you need to shrink the file to its minimum size,
you need to issue an explicit "VACUUM" SQL request. Note that this will
result in a full rewrite of the file."""

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161130/e01a5043/attachment.html>


More information about the gdal-dev mailing list