# How to fix osm2pgrouting error 'relation "\_\_waysXXXX" does not exist' and speed up the import

DevFeed: [How to fix osm2pgrouting error 'relation "\_\_waysXXXX" does not exist' and speed up the import](<https://devfeed.tech/articles/how-to-fix-osm2pgrouting-error-relation-waysxxxx-does-not-exist-and-speed-up-the-import-35593.md>)

Original publisher: [Read original article](<https://blog.rtwilson.com/how-to-fix-osm2pgrouting-error-relation-__waysxxxx-does-not-exist-and-speed-up-the-import/>)

Author: Robin Wilson

Published: 2026-01-31T10:33:00Z

Content type: tutorial

Language: en

Sources: [Robin Wilson](<https://devfeed.tech/sources/robin-wilson.md>)

Topics: [import](<https://devfeed.tech/topics/import.md>), [Database](<https://devfeed.tech/topics/database.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>)

Tags: [cloud](<https://devfeed.tech/tags/cloud.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [database](<https://devfeed.tech/tags/database.md>), [error](<https://devfeed.tech/tags/error.md>), [gis](<https://devfeed.tech/tags/gis.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [import](<https://devfeed.tech/tags/import.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [speed](<https://devfeed.tech/tags/speed.md>)

## AI overview

A practical guide to fixing an osm2pgrouting error involving a missing __waysXXXX relation while importing OpenStreetMap data into PostGIS. It explains that increasing the command's chunk-size parameter can prevent crashes and reduce the import time to about 45 minutes, while requiring substantial RAM.

## Source excerpt

I don't seem to have time or energy for long posts these days, but here's another quick post which might save you some time and frustration. Recently, I've been trying to import OpenStreetMap data into a PostGIS database to use with pgRouting. I wanted to import data for the whole of England - which has [...]