The project has a new website (osm2pgsql.org) now with extensive documentation and examples, and with sections on support, contributing, news. etc. Most of the documentation from the repository and the OSM wiki was moved there. We still have a man page, it is now maintained in markdown format. All the documentation, man page, help texts etc. have been cleaned up, made more consistent and brought up to date.
The program has a much improved log output now. Each line is prefixed with a date/timestamp and by default osm2pgsql isn’t as verbose any more. You can change the verbosity using several options. You can even have super-verbose logging of all SQL commands issued and all data written to the database. Warnings and errors now appear in red color if your console supports it. Progress output can be disabled, for instance when the output is redirected to a file. When printing how long something took, osm2pgsql will now not only print the seconds but also a more human readable format with hours, minutes, and seconds.
In the last release (version 1.3.0) we have already added a warning when you used input files with negative OSM object ids or input files which are not ordered correctly. These are now not allowed any more and osm2pgsql will stop with an error if it detects these. See the manual for how to work around this. This allowed us to improve the handling of multiple input files. Osm2pgsql now reads multiple input files at the same time merging the contents. This means that you can now import several extracts in one go. Note that the extracts still have to come from the same point in time!
Changes in the flex output (which is still marked experimental). Note that some of these are breaking changes compared to the behaviour in version 1.3.0:
- Fix: Flex output sometimes created two id indexes on the same table.
- Set projection for geometry columns in the table configuration. The command
--projare not used by the flex output any more.
- Flex mode setting
type_columnfixed. Now also supports id columns compatible with Imposm.
- Optionally wrap polygon geometries in multipolygons if the geometry column of the target table is of type MultiPolygon.
- Switch multipolygon generation from default off to default on. The
multioption on the area geometry transformation has been removed and there is a new option
- Add several Lua helper functions for flex config files.
- The middle, pgsql output and flex output now all support setting the schema used for tables, indexes and functions.
- Add support for the new API of the PROJ library (used since PROJ version 6).
- Fixed bug in 1.3.0 that didn’t disable the PostgreSQL JIT processing which slows down osm2pgsql considerably when using PostgreSQL 12 and above.
- Do not create
planet_osm_nodestable if flat nodes are used.
- Print database version and check that we are using a supported PostgreSQL version.
- Allow PostgreSQL conninfo string in
- Removed legacy code that tried to alter existing database tables if your config changed since the initial import. This code could only detect and do very few necessary changes and therefore could not be relied upon anyway.
--with-forward-dependenciesoption. This allows to disable dependency management. Used for Nominatim.
- There is a new “bucket index” for the node-to-way-lookup in the middle. It needs a lot less disk space and imports are much faster, but updates will be slower. It is currently not enabled, but osm2pgsql experts are encouraged to try it out and give us feedback. See the manual for details.
- As usual, there are various code cleanups and bug fixes.
The ‘multi’ output was already deprecated in the last version (1.3.0), it will be removed in the next release.