NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi, I don't know if osm2pgsql ended, because it stopped at this point with no error and RAM memory size decreased a lot but I'm not sure if the process finished:

alt text

asked 23 Apr '14, 15:56

AnderOSM's gravatar image

AnderOSM
714411
accept rate: 0%

edited 23 Apr '14, 16:30

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

How long has it been 'stopped'?

(23 Apr '14, 18:02) BarqsDew

At least 1 hour. The file .osm.pbf was ~400 MB (only Spain).

(23 Apr '14, 18:07) AnderOSM

When osm2pgsql is finished, it will report how long it took in seconds (e.g. Osm2pgsql took 14664s overall)

Looking at what has completed the rendering tables are finished, but the slim tables that are used for updates and reduced memory usage for the import are still not finished in your screenshot. More specifically, a large GIN index is built on planet_osm_ways.nodes. At this point, osm2pgsql doesn't need memory or CPU, but PostgreSQL does, as it's doing the work of building the index.

For future reference, if you are not planning on consuming diffs you can use the command line options --slim --drop to drop the slim tables once they're not longer needed. This will significantly speed up the import as it doesn't have to build indexes.

permanent link

answered 23 Apr '14, 19:23

pnorman's gravatar image

pnorman
2.4k52140
accept rate: 18%

I'm new with this so I understand that I shouldn't have rebooted the computer - PostgreSQL was working. Ok. It was a trial so I will delete the database and start over.

But I don't understand what you say about --slim and --drop. I was doing a first import... I hadn't come to think about updating the data. Could you explain that to me?

Thanks!

(23 Apr '14, 19:27) AnderOSM
1

--slim/-s is used either when you don't have enough RAM to store all the data in it, or when you want to later update the database. The --drop option is for when you don't have enough ram to import in non-slim mode, but don't plan on later updating, but instead intend to reload the data later.

(27 Apr '14, 05:24) pnorman
2

Thank you, finally I run the script a second time and, after 6.5 hours, I had all Spain's data imported.

(27 Apr '14, 23:54) AnderOSM

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×48

question asked: 23 Apr '14, 15:56

question was seen: 2,644 times

last updated: 27 Apr '14, 23:54

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum