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

Ryan Lambert notifications at github.com
Fri Dec 8 01:40:19 UTC 2023


> The properties table does change the game a little bit: you cannot do two imports with different prefixes on the same database anymore without breaking something. That was not the case before. The recommended work-around is to use schemas but, again, we do have some historic baggage here.

I guess I'm not aware of the baggage with schemas.  How does this interact with flex styles that save tables to schemas? A good portion of what I've found useful lately is loading a variety of
[different data, with different styles, to different schemas](https://blog.rustprooflabs.com/2023/08/load-right-amount-of-openstreetmap). The styles I use [set schema dynamically](https://github.com/rustprooflabs/pgosm-flex/blob/main/flex-config/style/building.lua#L14).

There are already limitations around multiple sources within one DB with replication (e.g. https://github.com/osmcode/pyosmium/issues/214), I'd prefer not to see multiple sources further limited.  If I have to drop the properties tables to load into multiple schemas I can, but that seems to dilute the purpose of that table in this scenario.

Would it be possible to define which schema the properties table is saved in?  This seems like it would still allow supporting multiple imports to a single database w/out losing the addition of safety against accidentally doing bad things. Another possible approach could be changing the table from a tall table (2 columns, many rows) into wide structure. Either via dedicated columns or a JSON/JSONB column?  This would allow adding a `schema_name` column to allow support of that.

> I'd rather do it without introducing an additional command line.

Understandable, I'm okay with your suggestion to manually delete the table when needed.


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

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


More information about the Tile-serving mailing list