[postgis-tickets] [PostGIS] #5170: Make postgis raster copy rows configurable

PostGIS trac at osgeo.org
Thu Jun 9 13:53:02 PDT 2022


#5170: Make postgis raster copy rows configurable
-------------------------+---------------------------
 Reporter:  robe         |      Owner:  robe
     Type:  enhancement  |     Status:  new
 Priority:  medium       |  Milestone:  PostGIS 3.3.0
Component:  raster       |    Version:  master
 Keywords:               |
-------------------------+---------------------------
 A client asked me why does copy mode, always result in


 {{{
 COPY 11
 }}}


 11 rows per copy command.

 I checked in the code, and it appears to be a hard-coded setting.

 https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/raster/loader/raster2pgsql.c#L1518
 https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/raster/loader/raster2pgsql.c#L1845

 {{{
         if (tileset->length > 10) {
                                 if (!insert_records(
                                         config->schema, ovtable,
 config->raster_column,
                                         (config->file_column ?
 config->rt_filename[idx] : NULL), config->file_column_name,
                                         config->copy_statements,
 config->out_srid,
                                         tileset, buffer
 }}}

 I'm assuming this was put in place to get around some copy size limit.
 Can we get better load by increasing or making this configurable.

 I was going to test this out to see.  Given that the size of each row
 would be dependent on tile size, doesn't seem right it should always be
 11.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5170>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list