<p></p>
<h1><a href="https://github.com/osm2pgsql-dev/osm2pgsql/releases/tag/2.0.0">Release 2.0.0</a></h1><p style="font-size:small;-webkit-text-size-adjust:none;">Repository: <a href="https://github.com/osm2pgsql-dev/osm2pgsql">osm2pgsql-dev/osm2pgsql</a> · Tag: <a href="https://github.com/osm2pgsql-dev/osm2pgsql/tree/2.0.0">2.0.0</a> · Commit: <a href="https://github.com/osm2pgsql-dev/osm2pgsql/commit/7609e0eab385bbbf9c014a880bb20885a4bde447">7609e0e</a> · Released by: <a href="https://github.com/lonvia">lonvia</a></p>

<p>The day has finally arrived where we are releasing version 2.0.0. of osm2pgsql, five years after the release of 1.0.0.</p>
<p>This release marks a milestone in modernizing osm2pgsql. We removed a lot of accumulated cruft from more than a decade of development. This makes osm2pgsql easier to understand for users and for developers. And it has allowed us to solve some long-standing issues and will allow further improvements in the future.</p>
<p>Major breaking changes:</p>
<ul>
<li>The legacy format for the middle tables has been removed as well as the old non-bucket way node index.</li>
<li>The gazetteer output (used by Nominatim) has been removed.</li>
<li>Several command line options have been removed and others are checked more strictly.</li>
<li>There are some new library requirements and Lua is not optional any more.</li>
<li>The <code>add_row()</code> function in the flex Lua config has been removed, use <code>insert()</code> instead.</li>
<li>Check that Lua functions on OSM object are called correctly using the colon-syntax.</li>
<li>Handling of untagged objects and object attributes has changed.</li>
</ul>
<p>Please see the <a href="https://osm2pgsql.org/doc/manual.html#upgrading" rel="nofollow">Upgrading appendix</a> for the details of these changes. We suggest you update to version 1.11.0 first and resolve any issues you see there before upgrading to version 2.0.0.</p>
<p>This is the first release that deprecates the "pgsql" output, please start moving towards the "flex" output instead. See <a href="https://osm2pgsql.org/doc/faq.html#the-pgsql-output-is-deprecated-what-does-that-mean" rel="nofollow">this FAQ entry</a> for the details.</p>
<p>New features in the flex output:</p>
<ul>
<li>Two-stage processing now also supports node members of relations, not only way members</li>
<li>Optionally build id index as unique index</li>
<li>Allow setting the names of indexes in the database</li>
<li>New after_nodes|ways|relations() processing functions in flex Lua config files</li>
<li>Make osm2pgsql properties available in Lua in osm2pgsql.properties table</li>
<li>Add get_bbox() function to geometries in Lua</li>
<li>Allow empty config file in flex output, useful for some corner uses</li>
</ul>
<p>Changes in the generalization code:</p>
<ul>
<li>Add tile-based generalizer calling SQL commands</li>
<li>Fix: Do not run ANALYZE in append mode, autovacuum will do that for us</li>
<li>Fix: Handle errors in threads correctly stopping the program with an error message</li>
</ul>
<p>Other fixes and features:</p>
<ul>
<li>Make --flat-nodes also work in non-slim mode, useful if memory is tight</li>
<li>Fix off-by-one error in expire code generating out of bounds tiles</li>
<li>Property changes are stored later to database to avoid changing the database if anything breaks</li>
<li>Report (up to 100) missing nodes in the input file (in debug log)</li>
<li>Simplified code for area assembly from multipolygon relations</li>
<li>Replication: guess state from file when state info is not available</li>
<li>Flush and close COPYs after nodes, ways, and relations in flex output avoid COPYs that are open for a long time</li>
<li>Remove special case for old PostGIS versions when clustering</li>
<li>Avoid looking for parents of new nodes and ways in the database middle speeding up changes</li>
<li>As always: Lots of code cleanups, refactorings and small fixes</li>
</ul>

—<p>This release has 2 assets:</p><ul><li>Source code (zip)</li><li>Source code (tar.gz)</li></ul><p>Visit the <a href="https://github.com/osm2pgsql-dev/osm2pgsql/releases/tag/2.0.0">release page</a> to download them.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are watching this repository.<br /><a href="https://github.com/osm2pgsql-dev/osm2pgsql/releases/tag/2.0.0">View it on GitHub</a> or <a href="https://github.com/osm2pgsql-dev/osm2pgsql/unsubscribe_via_email/AA6353WYFL6GBJK373IRX5LZXLOFVANCNFSM4AAJZLAQ">unsubscribe</a> from all notifications for this repository.<img src="https://github.com/notifications/beacon/AA6353WAAUAPRUNWLT67YUTZXLOFVA5CNFSM6AAAAABOQCJT2OWGG33NNVSW45C7OR4XAZNHKJSWYZLBONS2UY3PNVWWK3TUL5UWJTQKPQZFS.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/osm2pgsql-dev/osm2pgsql/releases/tag/2.0.0",
"url": "https://github.com/osm2pgsql-dev/osm2pgsql/releases/tag/2.0.0",
"name": "View Release"
},
"description": "View this Release on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>