Commit 284a3e6
committed
Bugfix: Nodes not stored in node location store correctly
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 #15401 parent 75d41a0 commit 284a3e6
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
0 commit comments