Ticket #393 (closed defect: fixed)
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.