[gdal-dev] Hanging (or very slow) when ogr2ogr appending to PostGIS table
Even Rouault
even.rouault at spatialys.com
Thu Mar 14 11:14:12 PDT 2024
(re-adding list)
Le 14/03/2024 à 18:58, Robin Wilson a écrit :
> Hi Even,
>
> Perfect - adding —config PG_USE_COPY YES solved it. I’ll write a blog
> post about this that hopefully will be found by someone with the same
> issue in future.
You may also suggest documentation enhancement to
https://gdal.org/drivers/vector/pg.html . There's the convenient "Edit
on GitHub" button at the top right
>
> For context, is there a particular reason why this is only enabled by
> default when you’re creating a new table?
Yes, this is related to unique identifiers. At table creation, one can
make the reasonable expectation that no other process will concurrently
update the table since it didn't exist before. When updating/appending,
that hypothesis is less likely, hence it is safer to fallback to the
slower INSERT mode. I presume in the Azure context that you have a
client->server->client round-trip at each feature insertion.
>
> For what it’s worth, I was running this on GDAL 3.8.3 - I checked it
> was recent, but forgot to include it in my first email.
>
> Thanks,
>
> Robin
>
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240314/8e6c6275/attachment.htm>
More information about the gdal-dev
mailing list