Opened 6 months ago

Last modified 2 months ago

#4385 new enhancement

[raster2pgsql] -I option recreates index for each insertion

Reported by: RaphJ Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.5.4
Component: raster Version: 2.4.x
Keywords: Cc:

Description

raster2pgsql

The "-I" option does not make it clear that it recreates index for each insertion, which leads to poor performance for batch inserts (x10 slower).

I've seen confusion about it on tutorials and on StackOverflow?.

Could you please update the doc (man page and onlin) or even disable it (or output a warning) when used together with -a option (append).

Change History (1)

comment:1 Changed 2 months ago by robe

Milestone: PostGIS 2.5.3PostGIS 2.5.4

By insertion I presume you mean each append run. Not for each individual tile?

I haven't looked at this closely. It should in theory fail if there is already an index on the table. But it's also possible you do several append calls and then on your final commandline call you want to create the index on the table. So seems perfectly legit to allow -I and a together.

Anyway I'll push this to later once I've had time to test out all the scenarios

Note: See TracTickets for help on using tickets.