Hi all I have imported the Europe dataset in PostgreSQL with osm2pgsql, and I apply daily updates with a routine every night. Looking at the logs I keep, I believe one of the daily updates was not correctly applied. I was thinking about simply re-playing those updates (edit : all the daily updates since the failure, of course). Would this work ? From what I understand of the way osm2pgsql works it basically does inserts and deletes, so I'd say this could work, but I'd rather be sure. Thanks for your help on this ! asked 05 Mar '19, 07:55 codata_al |
osm2pgsql's update process is safe to replay. That means you can repeat updates provided you reapply all updates from the date that the update process failed and you apply them in the correct order. The database is only back to a consistent state when all updates have been processed. answered 05 Mar '19, 11:44 lonvia SomeoneElse ♦ That's excellent news Lonvia ! Thanks for your help !
(05 Mar '19, 12:07)
codata_al
|
Hi again ! Just to make sure I got this right : I've had ONE update failing (say, sequenceNumber = 2245 for instance), BUT the ones after that ran fine (2246 was applied, as well as 2247 and 2248). It is fine to reapply all updates starting from 2245 (2245 to 2248), even though the updates from 2246 to 2248 had already been applied ? Sorry for being so verbose, but I am not sure that my first message made it very clear that I had subsequent update successfully applied. Thanks ! answered 15 May '19, 09:52 codata_al 2
Yes, that's what I meant with the answer above. If you want to reapply 2245, you must reapply 2246 to 2248 afterwards again. When all changes until 2248 are applied, your database is in a consistent state.
(15 May '19, 10:13)
lonvia
Great, just wanted to be 100% sure. Sorry for the noise, and thanks again !
(15 May '19, 10:18)
codata_al
|