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
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.
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.