[postgis-devel] [PostGIS] #393: shp2pgsql returns "fseek(-xxx) failed on DBF file." for large (>2GB) DBF files

PostGIS trac at osgeo.org
Tue Jan 26 13:44:57 PST 2010


#393: shp2pgsql returns "fseek(-xxx) failed on DBF file." for large (>2GB) DBF
files
-----------------------------------------------+----------------------------
 Reporter:  maximeguillaud                     |       Owner:  pramsey      
     Type:  defect                             |      Status:  new          
 Priority:  medium                             |   Milestone:  PostGIS 1.4.2
Component:  postgis                            |     Version:               
 Keywords:  shp2pgsql fseek failed large file  |  
-----------------------------------------------+----------------------------
 Running shp2pgsql on large files fails when the .DBF is over 2^31^ bytes.
 It throws multiple messages such as
 "`fseek(-2124469057) failed on DBF file.`"
 (with the quoted offset changing).

 An example of such large files is the europe_highway.shp in the archive at
 http://downloads.cloudmade.com/europe/europe.shapefiles.zip. These files
 are [http://www.osm.org OpenStreetMap] data.

 The attached patch fixes the problem for me on a Linux/amd64 platform.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/393>
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-devel mailing list