This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

osm2pqsql data loading issue

0

Hi All,

I've tried to load planet-latest.osm.bz2 to postgresql DB using osm2pgsql tool. After unexpectable loading process interruption I reran osm2pgsql with --append flag, but got the following error:

Using projection SRS 900913 (Spherical Mercator) Setting up table: planet_osm_point Problem reading geometry information for table planet_osm_point - does it exist? Error occurred, cleaning up

Is there any way to continue loading process without data base rewriting?

asked 17 Jan '13, 11:04

jurasv's gravatar image

jurasv
11112
accept rate: 0%


2 Answers:

1

Is it possible that there's a permission problem? Can you log in to the database with the same database user ID you instructed Osmosis to use and then do

select * from geometry_columns;

or does that result in an error message?

answered 17 Jan '13, 14:09

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

My OSM planet database owner is postgres. I logged in to the DB with postgres user ID and ran sql script you sent me. The geometry_columns table is empty. Table planet_osm_point doesn't exist in the DB.

(21 Jan '13, 14:17) jurasv

1

Osm2pgsql uses transactions in the initial phase of data loading. If during that phase an error occurs and osm2pgsql fails, postgresql rolls back the transaction entirely, leaving no trace of the failed import in the database.

Only once you reach the indexing phase is it possible (or desirable performance wise) to continue a failed import, although only by manually running all the steps osm2pgsql would run for you. In all other cases you have to or are better off starting the import from scratch.

answered 21 Jan '13, 15:57

apmon's gravatar image

apmon
6.5k184456
accept rate: 20%