Re: [OSM-talk] osm2pgsql diff application with filtered OSM data

2018-11-13 Thread Nick Whitelegg
>This will leave your site down between the delete and import of new data.

>It's also going to be fragile, because using append mode with a file that 
>isn't a diff isn't supported, and if the area has a lot of footpaths, it'll be 
>slower, since >append has to do more work.

>If you match the SQL delete and osmosis filtering carefully you shouldn't get 
>too many errors, but you've probably got some to do with updates and >changing 
>object types.

>As long as you're aware of these problems and it works for your needs, I'd say 
>to go for it.


Thanks. I have actually used append frequently over several years and never had 
a problem with it; main issue is that memory is expensive on servers so I have 
to do take various less-than-ideal steps to work round low memory.


The intention is to bring the site down over the (say) 2-3 hours the update is 
taking place; this is what I used to do when I last performed weekly updates. 
This would be scheduled for (probably) Wednesday 0100-0400 UK time, a time that 
the server is likely to see little traffic as it's UK and Ireland oriented; at 
such time most of Europe will be asleep. Granted there might be a few 
out-of-Europe visitors at that time; but as my site is quite niche with limited 
visitors, I consider this acceptable downtime.


Nick


From: Paul Norman 
Sent: 13 November 2018 10:12:58
To: talk@openstreetmap.org
Subject: Re: [OSM-talk] osm2pgsql diff application with filtered OSM data

On 2018-11-11 7:53 AM, Nick Whitelegg wrote:


After thinking about this, I realised that I don't really want to update _all_ 
the data that often. The only thing I need to update on a weekly basis is the 
footpaths (I'm not so bothered if say the roads, or the pubs are a year out of 
date - as long as newly mapped footpaths appear quickly). So what I'm now doing 
is just doing an osmosis extract of paths weekly, deleting all data in the DB 
which I class as a 'path' and repopulating in amend mode.

This will leave your site down between the delete and import of new data.

It's also going to be fragile, because using append mode with a file that isn't 
a diff isn't supported, and if the area has a lot of footpaths, it'll be 
slower, since append has to do more work.

If you match the SQL delete and osmosis filtering carefully you shouldn't get 
too many errors, but you've probably got some to do with updates and changing 
object types.

As long as you're aware of these problems and it works for your needs, I'd say 
to go for it.
___
talk mailing list
talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] osm2pgsql diff application with filtered OSM data

2018-11-13 Thread Paul Norman

On 2018-11-11 7:53 AM, Nick Whitelegg wrote:



After thinking about this, I realised that I don't really want to 
update _all_ the data that often. The only thing I need to update on a 
weekly basis is the footpaths (I'm not so bothered if say the roads, 
or the pubs are a year out of date - as long as newly mapped footpaths 
appear quickly). So what I'm now doing is just doing an osmosis 
extract of paths weekly, deleting all data in the DB which I class as 
a 'path' and repopulating in amend mode.




This will leave your site down between the delete and import of new data.

It's also going to be fragile, because using append mode with a file 
that isn't a diff isn't supported, and if the area has a lot of 
footpaths, it'll be slower, since append has to do more work.


If you match the SQL delete and osmosis filtering carefully you 
shouldn't get too many errors, but you've probably got some to do with 
updates and changing object types.


As long as you're aware of these problems and it works for your needs, 
I'd say to go for it.
___
talk mailing list
talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk