Skip to content

Commit 8763ce9

Browse files
committed
ignore relations with more than 32k members
There is a hard restriction in the pgsql middle tables, where relation members are indexed using a smallint. To remain consistent, drop all relations which exceed this size. Fixes osm2pgsql-dev#713.
1 parent 54e8a46 commit 8763ce9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

parse-osmium.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ void parse_osmium_t::relation(osmium::Relation const &rel)
176176
if (rel.deleted()) {
177177
m_data->relation_delete(rel.id());
178178
} else {
179+
if (rel.members().size() > 32767) {
180+
return;
181+
}
179182
if (m_append) {
180183
m_data->relation_modify(rel);
181184
} else {

0 commit comments

Comments
 (0)