[OSM-dev] Osmosis and Postgresql

Jeffrey Warren warren at mit.edu
Tue Jul 7 23:50:31 BST 2009


No, the data is not corrupt, nor are there duplicate entries. Quite a
few current_way_nodes are not getting
deleted when they cease to be 'current', that is, once they're only
history and no longer part of the current
planet.
I asked
earlier about what mechanism actually deletes current_way_nodes if
marked for deletion (i think the tag is 'visible=false' but i might be
mistaken) but nobody seemed to know - it seems the best route is to go
through and delete those orphans, but I couldn't  write a single SQL
query to do so efficiently and before writing a script to do it, I
realized that the rails port doesn't really care if they're there, or
if the constraint is created.

Jeff

On Tue, Jul 7, 2009 at 3:24 PM, Shaun McDonald <shaun at shaunmcdonald.me.uk>wrote:

>
> On 7 Jul 2009, at 18:47, Joachim Zobel wrote:
>
> > Am Mittwoch, den 01.07.2009, 09:47 +1000 schrieb Brett Henderson:
> >> Jeffrey Warren wrote:
> >>> And along those lines, should we remove the foreign key constraints
> >>> from the schema, Brett, if they're not necessary and they cause
> >>> Osmosis imports to fail?
> >> I don't mind really.  I only make them available as a convenience so
> >> people don't need to run the rails migrations themselves.  I don't
> >> want
> >> to put much effort into maintaining them so I just leave them as is.
> >> Is
> >> this something you'd be interested in looking after?
> >
> > I am somewhat confused, maybe I missed something. Either you can
> > recreate the constraint if the import is done or the data is
> > _corrupt_.
> >
> > If you are loading a larger volume of data you probably want to drop
> > _all_ constraints and indexes before that, recreate some in the middle
> > and the rest afterwards.
> >
>
> Could it be that your constraint failures are due to a node/way/
> relation containing two keys that have different capitalisation?
>
> Shaun
>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090707/3a6dc6d6/attachment.html>


More information about the dev mailing list