Skip to content

0.9.0

Compare
Choose a tag to compare
@rustprooflabs rustprooflabs released this 24 Jun 13:01
· 69 commits to main since this release
50c6ddd

PgOSM Flex 0.9.0

This release contains ⚠️ breaking changes ⚠️. The original _all views for the building, shop and POI layers have been replaced by tables. The tables are built via osm2pgsql Flex style which enables loading only the combined table, instead of requiring the base point/line/polygon tables to be built first.


Commit hash: 50c6ddd

The commit hash from this git repo shows up with the PgOSM Flex version number in SELECT pgosm_flex_version FROM osm.pgosm_flex; If you see this version with a different commit hash, it indicates you are using a latest Docker image with untagged features.


Backend changes

  • Improve test coverage #338
  • Add DB connection information to initial log output #335

Data changes

  • Replace _all views/materialized views to tables populated by osm2pgsql #320, #337, #340

Impacts with this change

The following subsections include minimized notes from #337 to explain a variety of shifts coming along with this change (#320).

The views have turned into tables and are not always created. Only some packaged layersets include these to avoid additional overhead by default.

  • vbuilding_all --> building_combined_point
  • vshop_all --> shop_combined_point
  • vpoi_all --> poi_combined_point

Pros / Cons

Enables loading combined point table w/out requiring load of full polygon data. This can be considerable size savings when larger polygons are involved in the source data but being simplified before loading to Postgres.

vbuilding_all and vshop_all were views doing the combination and simplification on-the-fly. Wasn't good for general querying performance beyond small regional data. New table structure is only points, and fully indexed.

Requires duplicating a bit of logic in the Lua styles. The negative impact was minimized by moving common logic into new helper methods. E.g. building and building_combined_point leverage common logic in building_helper. There is almost certainly room for improvement in these areas.

Increased data size with layerset=everything with more data loaded to tables. Because of additional overhead, not loading the new _combined tables in default layerset. However, this opened the opportunity to consider loading more _combined_points layers into lightweight layersets. These are discussed in the Layerset Changes subsection.

Layerset Changes

Layerset: Basic
  • ❌ Remove building_polygon
  • ➕ Add building_combined_point
  • ➕ Add poi_combined_point
Layerset: Everything
  • ➕ Add building_combined_point
  • ➕ Add poi_combined_point
  • ➕ Add shop_combined_point
Layerset: Minimal
  • ❌ Remove poi
  • ➕ Add poi_combined_point

Documentation

  • Improved comments on SQL objects #340

Upgrade notes for --replication

Need to manually drop old views and materialized view using the db/data-migration/0.9.0.sql script. The updated import makes no attempt to remove these legacy objects. Leaving these legacy objects behind shouldn't cause any actual problems other than having multiple sources to retrieve identical data. Leaving the extra MV will increase disk usage unnecessarily.


Full Changelog: 0.8.2...0.9.0