I am importing north-america osm data using osm2pgsql in slim mode. i am only importing roads data. after import the total size of the db around 45gb. most of the space is occupied by asked 07 Aug '17, 14:29 aitizazk |
Truncating the tables is unlikely to work. What osm2pgsql does when importing is to build the geometry for the roads by going through the list of nodes in a way and building a linestring from the coordinates stored in the nodes. If the geometry of a way changes the linestring is rebuilt, this implies that osm2pgsql needs access to all the original nodes of the way and not just the ones that changed in the diff. You might be able to save a bit of space by using the --flat-nodes option which stores nodes in a file instead of a database table (see https://github.com/openstreetmap/osm2pgsql/blob/master/docs/usage.md ), answered 07 Aug '17, 17:56 SimonPoole ♦ |