<p></p>
<pre><code>$ osm2pgsql -d gis --prefix osm --create --slim --output=flex --style osm2pgsql.lua --flat-nodes ./osm_nodes.bin --middle-way-node-index-id-shift 5 --cache 32000 planet-latest.o5m
2021-03-24 17:48:24  osm2pgsql version 1.4.1
2021-03-24 17:48:24  Database version: 11.10 (Debian 11.10-0+deb10u1)
2021-03-24 17:48:24  PostGIS version: 2.5
2021-03-24 17:48:24  Node-cache: cache=32000MB, maxblocks=512000*65536, allocation method=11
2021-03-25 02:27:48  Reading input files done in 31162s (8h 39m 22s).         74.7/s)
2021-03-25 02:27:48    Processed 6742003174 nodes in 2640s (44m 0s) - 2554k/s
2021-03-25 02:27:48    Processed 746437654 ways in 21669s (6h 1m 9s) - 34k/s
2021-03-25 02:27:48    Processed 8731600 relations in 6853s (1h 54m 13s) - 1k/s
2021-03-25 02:27:48  Reprocess marked ways (stage 2)...
2021-03-25 02:27:48  Creating id index on table 'osm_lines'...
2021-03-25 02:32:06  Creating id index on table 'osm_boundaries'...
2021-03-25 02:32:06  Creating id index on table 'osm_polygons'...
2021-03-25 02:39:28  Creating id indexes took 700s (11m 40s)
2021-03-25 02:39:28  There are 320513 ways to reprocess...
2021-03-25 10:20:23  Clustering table 'osm_lines' by geometry...
2021-03-25 10:20:23  Clustering table 'osm_points' by geometry...
2021-03-25 10:20:23  Clustering table 'osm_polygons' by geometry...
</code></pre>
<p>Everything is going pretty fast except stage 2: I've looked what it was doing for almost 8 hours and have found out that postgresql was DELETEing 320513 ways. It does not look normal.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/1436">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353RFK6APVE4DLCAAVMLTFMRURANCNFSM4ZZHGTSQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353V3MORIFCVF2NYO6T3TFMRURA5CNFSM4ZZHGTS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MQ6R6UA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/1436",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/1436",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>