[Tile-serving] [openstreetmap/osm2pgsql] Postgres database update error by osm2pgsql (#1571)

Francisco P.A. Junior notifications at github.com
Fri Sep 17 12:55:45 UTC 2021


We have an error situation in the update process.
At certain times, the update process crashes and does not proceed. The error message in the file /var/log/tiles/osm2pgsql.log is shown below:

> Reading in file: /var/lib/mod_tile/changes.osc.gz
> Using XML parser.
> Processing: Node(10k 0.0k/s) Way(3k 3.66k/s) Relation(40 20.00/s)  parse time: 407s
> Node stats: total(10020), max(9090048720) in 404s
> Way stats: total(3661), max(983093395) in 1s
> Relation stats: total(81), max(13209476) in 2s
> DB writer thread failed due to ERROR: result COPY_END for planet_osm_polygon failed: ERROR:  invalid input > syntax for type integer: "2.75"
> CONTEXT:  COPY planet_osm_polygon, line 26, column layer: "2.75"

The message seems to indicate that a double value (2.75) is being written to the layer field of the planet_osm_polygon table, which is set to integer.

To work around this, we decreased the value of the maxInterval parameter in the configuration file /var/lib/mod_tile/.osmosis/configuration.txt
And we manually increment the sequenceNumber value of the /var/lib/mod_tile/.osmosis/state.txt file, so that it advances in the update. We believe there may be some information recorded wrong in the update files, which are available at https://planet.openstreetmap.org/replication/minute

However, this is impacting our environment as it requires a lot of technical intervention.

Our environment is Ubuntu 20.04 LTS. The osm2pgsql version is shown below:

osm2pgsql version 1.2.1 (64 bit id space)
Compiled using the following library versions:
Libosmium 2.15.4
Lua 5.2.4

We would appreciate if you can guide us on how to solve the problem.

Yours sincerely,


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1571
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210917/8def46fb/attachment.htm>


More information about the Tile-serving mailing list