[OSM-dev] Running PostGIS on limited memory

Raphaël Jacquot sxpert at sxpert.org
Wed Mar 7 07:44:17 GMT 2007

Nick Whitelegg wrote:
> On Wednesday 07 Mar 2007 00:39, Nick Whitelegg wrote:
>> Has anyone encountered this? I just can't get it to run. (latest SVN
>> version)
> I think I figured this out after posting, but by that time I'd gone to bed :-) 
> It's using up too much memory - the array of 35 million nodes and segments is 
> more than my Bytemark VM can handle. It looks like osm2pgsql.c will need a 
> rewrite so that it uses a std::map rather than array.

no, it's just doing things the wrong way.
the real solution is to use the functionnalities of the db server 
(storing arrays of things and allowing fetching them fast) to do it. 
loading everything in ram is the opposite of what should be done.

> Incidentally, before I spend too much time on this, would the PostGIS approach 
> of storing the whole of the UK (with appropriate caching of generated images) 
> on the Bytemark VM be feasible, given that I only have 160MB available, or 
> would I be better off with the original plan of fetching .osm data in smaller 
> tiles from the live OSM server, generating images on the fly and caching them 
> for, say a month?

yes it is doable. you'd store a representation of the part of planet in 
the postgresql db, then run a stored procedure that would assemble the 
dataset for mapnik

> Thanks,
> Nick
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

More information about the dev mailing list