The following bug has been logged on the website:
Bug reference: 16183
Logged by: Christian Quest
Email address: github@cquest.org
PostgreSQL version: 12.1
Operating system: Ubuntu 18.04
Description:
I'm running several OpenStreetMap map rendering servers. They are all based
on PG/postgis.
After an upgrade from v10 to 12, the usual update process took 10x more time
than it used to.
After digging a few days, it appear that the default jit=on is the cause.
The update tool (osm2pgsql) makes heavy use of PREPARED statements. Could
there be a bug in jit+PREPARED causing the statement to be recompiled on
each execute ?
The other side of the issue is described here:
https://github.com/openstreetmap/osm2pgsql/issues/1045