[OSM-dev] osm2pgsql slow on update import

Frederik Ramm frederik at remote.org
Tue May 3 14:36:54 BST 2011


On 05/03/2011 03:28 PM, Jukka Rahkonen wrote:
> I am pretty lazy nowadays with updates and when I update once per month or
> so I am running full import of finland.osm.bz2 into another database and
> when it is finalized I am changing the database connection strings of my
> clients.

I'm sure you know that already but just in case - there's a tool called 
"pgbouncer" which lets you create a "virtual" database to which your 
clients connect, and redirects queries to whatever you put in the 
bouncer config. Lets you switch databases in the backend without 
interrupting existing connections or making changes to clients.

> I have been thinking that when I have the old and new imported database
> versions available, perhapsa I could somehow generate diff files for
> helping other people to keep their databases up-to-date. I would imagine
> that the system should compare osm_point, osm_line and osm_polygon tables
> and create a reasonable set of inserts, updates and deletes.
> Does this sound reasonable at all or would it still be faster to
> syncronise with the regular OSM diff files?

Having regional diffs would make things easier for many people I guess.


More information about the dev mailing list