shp2pgsql returns "fseek(-xxx) failed on DBF file." for large (>2GB) DBF files
|Reported by:||maximeguillaud||Owned by:||pramsey|
|Keywords:||shp2pgsql fseek failed large file||Cc:||arencambre|
Running shp2pgsql on large files fails when the .DBF is over 231 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 OpenStreetMap data.
The attached patch fixes the problem for me on a Linux/amd64 platform.
Change History (28)
Changed 7 years ago by maximeguillaud
comment:5 Changed 6 years ago by arencambre
- Cc arencambre added
- Milestone PostGIS 1.4.3 deleted
- Version set to 1.5.X