[postgis-devel] shp2pgsql defaults

Sandro Santilli strk at kbt.io
Tue Mar 3 01:42:16 PST 2020


On Mon, Mar 02, 2020 at 02:47:16PM -0800, Paul Ramsey wrote:
> Two defaults have bothered me over the years:
> 
> - the default load format is not dump, it’s insert, which is way way slower, we should default to the fast one and only drop out of that in cases were we have to (like forced srs transformation)

I think the reason for using INSERT was to be able to load in multiple
transaction rather than in a single one, which was found (back then,
before I even entered the scene) to be faster for very big shapefiles.

The downside of that kind of load (chunked loading) would be that the
load is not transactional, which is BAD if you ask me.

I guess before changing defaults we should verify if that speed difference
still exists.

> - the default is to not build indexes, which mostly we always want,
>   we should default to building indexes

I don't see a big value in changing defaults, honestly.
People will have to adapt and introduce conditionals in their code
to decide whether they'll need to create that index separately or
not, or what does the commandline switch does...

--strk;


More information about the postgis-devel mailing list