[Tile-serving] [openstreetmap/osm2pgsql] Bugfix: Nodes not stored in node location store correctly (#1541)

Jochen Topf notifications at github.com
Tue Jul 20 07:49:51 UTC 2021


When importing a planet file or a huge extract, something with more than
about 1 billion nodes, the new RAM node location could overflow a 32bit
"offset" value which meant that the node locations would not be found
again. The result were missing features, because osm2pgsql just ignores
features with geometries that can not be built due to missing node
locations.

This fix has two parts: First, it fixes the typo which made the max
block size too large. This typo lead to a doubling of the max block size
which directly lead to the bug. The other fix is to check the "offset"
value and, if it becomes too large, start a new block. This probably
isn't necessary for "normal" OSM data which should usually work with the
new max block size, but it provides a safety net in case some the block
size becomes too large for some data.

See #1540
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/1541

-- Commit Summary --

  * Bugfix: Nodes not stored in node location store correctly

-- File Changes --

    M src/ordered-index.cpp (3)
    M src/ordered-index.hpp (4)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/1541.patch
https://github.com/openstreetmap/osm2pgsql/pull/1541.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1541
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210720/e5a7d06f/attachment-0001.htm>


More information about the Tile-serving mailing list