[Tile-serving] [openstreetmap/osm2pgsql] osm2pgsql fails to create "osm_id" indexes on PostgreSQL 14 / Slow processing in "There are X ways to reprocess" step. (Issue #1674)

mboeringa notifications at github.com
Wed May 18 07:51:31 UTC 2022


@joto. The exact command line is one below. The latest version of the osm2pgsql 'flex' LUA style used is the one below in the zip. Do notice this style has a top configuration section with a 

`local db_schema = 'public'`

configuration setting that needs to be changed to the appropriate schema if a using a dedicated schema. I still need to verify it, but the separate issue of missing indexes seemed to occur with the schema set to public.

[openstreetmap-carto.zip](https://github.com/openstreetmap/osm2pgsql/files/8714129/openstreetmap-carto.zip)

![afbeelding](https://user-images.githubusercontent.com/7635726/168978751-ea5edca0-6e8d-43e2-942b-2797096e625d.png)

I have now also had a look at the postgresql logs. One particular thing I noticed, is that I see the DELETE statements of the **"There are X ways to reprocess"** processing step intermingled with continuously repeating COPY statements for the Line table. Note that these continuously emitted COPY statements already started at the **way** loading stage, so before the **"There are X ways to reprocess"** processing step.

Is this normal behavior? Strangely, I do not see these same SQL statements in pgAdmin, while I **do** see the DELETE statements in pgAdmin.

![afbeelding](https://user-images.githubusercontent.com/7635726/168984457-66b0e940-7bb0-4086-9d8b-170d12588109.png)

I have also had a closer look at the actual resource usage during the slow running **"There are X ways to reprocess"** processing step. As you can see from these image, PostgreSQL is only using a single core at 75%-100%, and iowait is negligible, so there appears to be at least no IO bottleneck:

![afbeelding](https://user-images.githubusercontent.com/7635726/168985197-dc050309-f786-4d33-90ad-899b1f1e89b2.png)

![afbeelding](https://user-images.githubusercontent.com/7635726/168985771-e3379e3f-50a2-4751-acf2-12172c3afb9c.png)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1674#issuecomment-1129687142
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/issues/1674/1129687142 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220518/ad404f5d/attachment.htm>


More information about the Tile-serving mailing list