Hitting errors on missing table while executing "imposm run"

49 views
Skip to first unread message

Natti Baron

unread,
Oct 13, 2021, 6:18:19 AM10/13/21
to imposm
Hello awesome imposms!

I'm trying to develop a utility which will spin off a Postgres db for an OSM sub-region, and instantly set up live updates so that the database is refreshed continuously.

Unfortunately, when I run imposm to pull updates I get the following error messages

[2021-10-13T08:57:22Z] 0:02:07 [error] Importing #4754720: begin postgis transaction for table osm_waterareas: SQL Error: pq: relation "public.osm_waterareas" does not exist in query INSERT INTO "public"."osm_waterareas" ("osm_id", "geometry", "name", "type", "area") VALUES ($1, $2::Geometry, $3, $4, $5)

This table is indeed missing from the public schema.
What am I doing wrong? Did I unknowingly miss a step in the osm setup process?

Thank you!

----------
Additional background:
I'm spinning up a docker container for the imposm utility, and following the docker configuration I execute the initial load of the osm.pbf file. 
subregion, and the osm pbf file are sent as parameters:

/root/go/bin/imposm import -config /dubhub/$subregion/config.json -read /dubhub/$subregion/$filename -write -optimize --overwritecache -diff 

This command appears to work smoothly. After it completes, I run imposm once more with the same configuration 
/root/go/bin/imposm run -config /dubhub/$subregion/config.json

I get the following types of errors:
relation "x" does not exist

Examples:

[2021-10-13T08:55:16Z] 0:00:00 [error] Importing #4754720: begin postgis transaction for table osm_roads: SQL Error: pq: relation "public.osm_roads" does not exist in query INSERT INTO "public"."osm_roads" ("osm_id", "geometry", "type", "name", "tunnel", "bridge", "oneway", "ref", "z_order", "access", "service", "class") VALUES ($1, $2::Geometry, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)

[2021-10-13T08:55:18Z] 0:14:47 [error] Importing #4754720: begin postgis transaction for table osm_housenumbers_interpolated: SQL Error: pq: relation "public.osm_housenumbers_interpolated" does not exist in query INSERT INTO "public"."osm_housenumbers_interpolated" ("osm_id", "geometry", "name", "type", "addr:street", "addr:postcode", "addr:city", "addr:inclusion") VALUES ($1, $2::Geometry, $3, $4, $5, $6, $7, $8)

[2021-10-13T08:55:18Z] 0:00:02 [error] Importing #4754720: begin postgis transaction for table osm_waterways: SQL Error: pq: relation "public.osm_waterways" does not exist in query INSERT INTO "public"."osm_waterways" ("osm_id", "geometry", "name", "type") VALUES ($1, $2::Geometry, $3, $4)

[2021-10-13T08:55:22Z] 0:00:06 [error] Importing #4754720: begin postgis transaction for table osm_admin: SQL Error: pq: relation "public.osm_admin" does not exist in query INSERT INTO "public"."osm_admin" ("osm_id", "geometry", "name", "type", "admin_level") VALUES ($1, $2::Geometry, $3, $4, $5)




Imre Samu

unread,
Oct 13, 2021, 10:05:47 AM10/13/21
to imp...@googlegroups.com
Hi,

>  ..."public.osm_waterareas" does not exist  ...
> This table is indeed missing from the public schema.
> What am I doing wrong? Did I unknowingly miss a step in the osm setup process?

-deployproduction ?

IMHO:
- check the "import" schema.   Can you see the tables? 
- check the documentation: https://imposm.org/docs/imposm3/latest/tutorial.html#deploy-production-tables   ( search for "public" )
    ....
   "Imposm can deploy all imported tables by updating the schema of the tables. To move all tables from "import" to the default schema "public"  ..."

Regards,
 Imre Samu


--
--
_______________________________________________
Imposm mailing list
imp...@googlegroups.com
http://groups.google.com/group/imposm

---
You received this message because you are subscribed to the Google Groups "imposm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to imposm+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/imposm/56e1b8aa-fb80-4447-85b5-64610033603cn%40googlegroups.com.

Natti Baron

unread,
Oct 13, 2021, 11:41:10 AM10/13/21
to imposm
Hello Imre, dear Imposms,

I found the solution (here in the forum messages :-))
/root/go/bin/imposm import -config /dubhub/$subregion/config.json -read /dubhub/$subregion/$filename -write -optimize --overwritecache -diff -dbschema-import="public"

This works, and it's just awesome!

Thank you for the help!
Natti
Reply all
Reply to author
Forward
0 new messages