On Wed, Nov 26, 2008 at 7:54 AM, Stefan de Konink <[EMAIL PROTECTED]> wrote: > Then let me even get a better proposal; A second machines will be > installed that has enforced foreign keys. This second machine will produce > the planet. And will directly trigger events upon corruption so the main > API doesn't need to cope with them until 0.6.
it is worth noting that foreign keys and transactions alone will drastically reduce the number of problems, but may not solve them entirely. the foreign key from current_way_nodes to current_ways and current_nodes only ensures that those nodes have existed. the current_* table stores (as the name suggests) the current state of entities. that state may be "deleted". what would be ideal is a check like "node_id references way_nodes.node_id check way_nodes.visible = 1", but i can't find any documentation for this in mysql or postgres. one solution is to delete deleted ways/nodes from current_, but this would complicate the code to determine whether the appropriate response from the API is 403 or 404. thoughts, suggestions? cheers, matt _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

