My osm2pgsql planet import chugged along for weeks and weeks and then the PostgreSQL backend crashed sometime after the creation of planet_osm_point_temp and planet_osm_roads_temp and during the creation of planet_osm_polygon_tmp as shown below. It seems I was ever so close to completing the process, and hoping I can pick up where it left off, but I cannot find the sql statements except that it seems they are generated in code. I am wondering if there is a documented set of SQL statements that are carried out during the process. It looks like middle-pgsql.cpp and table.cpp, but I'm hoping there might exist a set of the statements. Thanks.
asked 24 Sep '18, 16:35 middleforkgis |
Given half adequate hardware a full planet import should complete in max 2 days (if you are talking about import in to the rendering schema). Trying to fiddle around with SQL statements and rerunning parts of the import is likely going to take far longer than simply fixing the underlying issues (not to mention that a system that takes weeks to import will not be updatable without falling more and more behind). answered 24 Sep '18, 19:56 SimonPoole ♦ |
Thank you SimonPoole, Memory was all swapped out so I won't bore you with the performance issues. Of course the answer to my original question - without regards to the wisdom or lack thereof - was to capture statements in the pg logfiles, after setting 'log_statement' in postgresql.conf to 'all' and running a new osm2pgsql build on a tiny data extract. This gives the following (excerpt only - I won't post the whole thing but here it is in a gist
answered 24 Sep '18, 21:31 middleforkgis |