This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

index error when import planet data, psycopg2.errors.TriggeredDataChangeViolation

0

When I try to import planet osm data into my local nominatim service, I got a postgres error on the "--index" step:

2020-12-07 09:20:59 == Index ranks 0 - 4 '/data/www/nominatim/Nominatim-3.5.2/nominatim/nominatim.py' --database nominatim --port 5432 --threads 15 -v --maxrank 4WARNING: Starting indexing rank (0 to 4) using 15 threads WARNING: Starting rank 0 WARNING: Done 0/0 in 0 @ 0.000 per second - FINISHED rank 0 WARNING: Starting rank 1 WARNING: Done 0/0 in 0 @ 0.000 per second - FINISHED rank 1 WARNING: Starting rank 2 WARNING: Done 0/0 in 0 @ 0.000 per second - FINISHED rank 2 WARNING: Starting rank 3 WARNING: Done 0/0 in 0 @ 0.000 per second - FINISHED rank 3 WARNING: Starting rank 4 INFO: Done 100 in 0 @ 109289.617 per second - rank 4 ETA (seconds): 0.00 Traceback (most recent call last): File "/data/www/nominatim/Nominatim-3.5.2/nominatim/nominatim.py", line 326, in <module> Indexer(options).run() File "/data/www/nominatim/Nominatim-3.5.2/nominatim/nominatim.py", line 206, in run self.index(RankRunner(self.maxrank), 20) File "/data/www/nominatim/Nominatim-3.5.2/nominatim/nominatim.py", line 243, in index t.wait() File "/data/www/nominatim/Nominatim-3.5.2/nominatim/nominatim.py", line 133, in wait wait_select(self.conn) File "/data/www/nominatim/.local/lib/python3.6/site-packages/psycopg2/extras.py", line 778, in wait_select state = conn.poll() psycopg2.errors.TriggeredDataChangeViolation: tuple to be updated was already modified by an operation triggered by the current command HINT: Consider using an AFTER trigger instead of a BEFORE trigger to propagate changes to other rows.

My local nominatim version is 3.5.2, installed following the instructions on link text. The imported data is complete OSM Data downloaded from the osm planet.

Has anyone got the same error? Thanks for all advice!

asked 07 Dec '20, 02:13

SteveLiu1225's gravatar image

SteveLiu1225
11111
accept rate: 0%


One Answer:

1

answered 07 Dec '20, 02:16

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Source code available on GitHub .