[openstreetmap/openstreetmap-website] JOSM cannot upload new features to Rails local database (#2819)

Tom Hughes notifications at github.com
Mon Sep 7 06:27:29 UTC 2020


Yes but osmosis made incomplete changes to your database - it added new data but didn't modify the sequences to reflect that. That is a bug in osmosis.

If you change the database other than using our code then you get to keep the pieces, or the people that wrote the broken tools you used to do so do.

If you want to fix it yourself then you will need to use the [ALTER SEQUENCE](https://www.postgresql.org/docs/12/sql-altersequence.html) command:

```
ALTER SEQUENCE changesets_id_seq RESTART WITH n;
ALTER SEQUENCE current_nodes_id_seq RESTART WITH n;
ALTER SEQUENCE current_ways_id_seq RESTART WITH n;
ALTER SEQUENCE current_relations_id_seq RESTART WITH n;
```

Choosing values for `n` that are higher than any existing objects.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2819#issuecomment-688066349
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200906/f4740e21/attachment.htm>


More information about the rails-dev mailing list