[Tile-serving] [osm2pgsql] update the database using changesets removes tags in "hstore" columns of changed items (#93)
Frederik Ramm
notifications at github.com
Sun Oct 6 18:18:57 UTC 2013
I am copying this over from https://github.com/joto/osmium/issues/83 where it was off-topic; the original message is from https://github.com/thbeutin:
----
When creating an OSM database using hstore and columns using the command
osm2pgsql -c -d db_name -s -C 8000 -k -j -v -S style_file COUNTRY-latest.osm.pbf
a database is created with all tags in the "tags" hstore column and some selected tags are stored in dedicated columns. So far, so good and as expected. However, when updating the database using the command
osm2pgsql -a -d db_name -s -C 2500 -j -k -v -S style_file changes.osc.gz
all items that were updated may not have all their tags in the "tags" column of the
hstore anymore. Tags that have a separate column in the table disappear from
the "tags" hstore. Given that during the initial import tags are stored simultaneously in the dedicated columns and the "tags" hstore column, I expect that updates show the same behavior and update tags both in the separate columns as well as in the "tags" hstore.
Let me give an example:
Item abc has a tag building->yes in the "tags" hstore column as well
as a "yes" in the "building" column. If I now update this item and add a
building:use->residential tag, the tag building->yes in database "tags" hstore
column is deleted.
On request I can provide sample data to reproduce this issue.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20131006/9bccb47e/attachment.html>
More information about the Tile-serving
mailing list