Failed to import some datasets using osm2pgsql

osm2pgsql -a -s -S default.style -C 1000 -d gis -U postgres -H localhost --hstore antarctica-latest.osm [stopped while creating Relations but before commiting any data to Postgres (version 8.4). Same command with Central American data worked.
Here is output.

osm2pgsql SVN version af61cae663 (64bit id space)

release notes: ‘Windows version built by Dominik Perpeet ([url]http://www.customdebug.com/osm2pgsql/index.html[/url])’
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE: table “planet_osm_point_tmp” does not exist, skipping
Setting up table: planet_osm_line
NOTICE: table “planet_osm_line_tmp” does not exist, skipping
Setting up table: planet_osm_polygon
NOTICE: table “planet_osm_polygon_tmp” does not exist, skipping
Setting up table: planet_osm_roads
NOTICE: table “planet_osm_roads_tmp” does not exist, skipping
Allocating memory for sparse node cache
Node-cache: cache=1000MB, maxblocks=128001*zd, allocation method=8192
Mid: pgsql, scale=100 cache=1000
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: antarctica-latest.osm
Processing: Node(4752k 18.1k/s) Way(101k 0.19k/s) Relation(30 7.50/s)
Would using Postgres 9.1 make any difference.

Hi,

Perhaps it is because of Antarctica and Spherical Mercator. The projection, officially EPSG:3857, is valid only till 85.06°S
http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::3857&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:3857

I do not know if PostGIS has constraints which prevents inserting coordinates which are outside the supported range but you can try by running osm2pgsql with the -l switch.

Sounds reasonable.
Unfortunately I have to use Windows, and I believe the Windows version only supports 1 projection.

I made a test and projection and data work for me. I am also on 32-bit Windows and PostgreSQL 9.0 + PostGIS 2.1 and I keep on using some osm2pgsql version from year 2012. I do not remember where I downloaded it but I keep a copy here:
http://latuviitta.org/downloads/osm2pgsql-2012-08-09.zip

This was my command

osm2pgsql -H localhost -P 5432 -d postgis21 -p testosm -U test -W -s -S c:\test\default.style -k
-G -r pbf --create --unlogged --cache-strategy sparse --cache 600 antarctica-latest.osm.pbf

Osm2pgsql is awfully slow with my computer and because I do not render maps but I am interested only in vector data I use nowadays GDAL for importing OSM data. See http://www.gdal.org/ogr/drv_osm.html