[Tile-serving] [osm2pgsql-dev/osm2pgsql] Refuse to import data when there is an osm2pgsql_properties table (PR #2085)

Ryan Lambert notifications at github.com
Tue Sep 26 00:01:47 UTC 2023


> I am worried though that people will just get into the habit of using `--force` and then it didn't buy us much. 

I'm not too worried about other people's habits. :smile: Seriously though, I think if there's a good error message (Error: Cannot import because of existing data.  Run with `--force` to override) people will default to the "safe" approach especially if that's what the docs recommend.  It's easy enough to re-run and add the additional switch when force is needed.

> I created this because I have been bitten twice already with this recently. ... So it is easy to clobber that table with an invalid osm2pgsql command line.

I ran into this exact problem in https://github.com/rustprooflabs/pgosm-flex/issues/313, I do like the default-safe option.  I think this type of protection is a good idea. However, if it's decided not to add this type of check I am also okay.  I run essentially all of my OSM imports via PgOSM Flex and have already added the protection I want there.  If it's added here, I just need to update to pass that new option along to osm2pgsql appropriately.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2085#issuecomment-1734626221
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2085/c1734626221 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230925/ca7d8523/attachment.htm>


More information about the Tile-serving mailing list