osm2pgsql-dev / osm2pgsql

OpenStreetMap data to PostgreSQL converter
https://osm2pgsql.org
GNU General Public License v2.0
1.5k stars 474 forks source link

osm2pgsql refuses to run in append mode if -C / --cache isn't specified #1362

Closed simonpoole closed 3 years ago

simonpoole commented 3 years ago

Example: /usr/local/bin/osm2pgsql -a -d gis --slim --hstore --number-processes 6 --flat-nodes /nvme/osm2pgsql/node.cache -e 15-16 -o /var/local/replication/tile_expiry changes.osc.gz

will fail with

2020-12-08 09:33:02 osm2pgsql version 1.4.0 (1.4.0) 2020-12-08 09:33:02 ERROR: Usage error. For further information call: osm2pgsql --help

Adding -C 500 will allow it to run.

As there is already a default cache value, the requirement to add this argument seems to be wrong.

joto commented 3 years ago

I can not reproduce this. Are you sure that's the command line you used? That error message typically means that you either used a non-existing command line option or that there was no input file on the command line.

simonpoole commented 3 years ago

It's literally from the script that failed and now is running with -C 500 Obviously there might be a two left thumbs issue, but haven't been able to locate that either.

Interesting after it ran through once, I removed the -C 500 and now it is quite happily running a 2nd time.

So I suppose something for the Journal of irreproducible results though the initial fail was reproducible ~6 times :-).