[Git][debian-gis-team/osm2pgsql][master] 2 commits: Add upstream patches.

Bas Couwenberg gitlab at salsa.debian.org
Thu Apr 8 19:46:21 BST 2021



Bas Couwenberg pushed to branch master at Debian GIS Project / osm2pgsql


Commits:
9cbf5cd5 by Bas Couwenberg at 2021-04-07T15:59:11+02:00
Add upstream patches.

- 0001-Bugfix-Disable-expire-in-flex-output-when-not-used.patch
  Important performance fix.
- 0001-Bug-fix-Remove-schema-name-from-CREATE-INDEX.patch
  Fix CREATE INDEX failure.

- - - - -
3a100fd3 by Bas Couwenberg at 2021-04-07T15:59:24+02:00
Set distribution to unstable.

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/0001-Bug-fix-Remove-schema-name-from-CREATE-INDEX.patch
- + debian/patches/0001-Bugfix-Disable-expire-in-flex-output-when-not-used.patch
- + debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,13 @@
-osm2pgsql (1.4.1+ds-2) UNRELEASED; urgency=medium
+osm2pgsql (1.4.1+ds-2) unstable; urgency=medium
 
   * Update watch file for GitHub URL changes.
+  * Add upstream patches:
+    - 0001-Bugfix-Disable-expire-in-flex-output-when-not-used.patch
+      Important performance fix.
+    - 0001-Bug-fix-Remove-schema-name-from-CREATE-INDEX.patch
+      Fix CREATE INDEX failure.
 
- -- Bas Couwenberg <sebastic at debian.org>  Sat, 20 Mar 2021 08:53:00 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Wed, 07 Apr 2021 15:59:14 +0200
 
 osm2pgsql (1.4.1+ds-1) unstable; urgency=medium
 


=====================================
debian/patches/0001-Bug-fix-Remove-schema-name-from-CREATE-INDEX.patch
=====================================
@@ -0,0 +1,21 @@
+Description: Bug fix: Remove schema name from CREATE INDEX
+ Indexes are always created in the same schema as the table.
+Author: Jochen Topf <jochen at topf.org>
+Origin: https://github.com/openstreetmap/osm2pgsql/issues/1436
+Bug: https://github.com/openstreetmap/osm2pgsql/issues/1447
+
+--- a/src/middle-pgsql.cpp
++++ b/src/middle-pgsql.cpp
+@@ -714,9 +714,9 @@ static table_sql sql_for_ways(bool has_b
+             "  SELECT ARRAY(SELECT DISTINCT"
+             "    unnest($1) >> {way_node_index_id_shift})\n"
+             "$$ LANGUAGE SQL IMMUTABLE;\n"
+-            "CREATE INDEX {schema}{prefix}_ways_nodes_bucket_idx"
+-            "  ON {schema}{prefix}_ways"
+-            "  USING GIN ({schema}{prefix}_index_bucket(nodes))"
++            "CREATE INDEX \"{prefix}_ways_nodes_bucket_idx\""
++            "  ON {schema}\"{prefix}_ways\""
++            "  USING GIN ({schema}\"{prefix}_index_bucket\"(nodes))"
+             "  WITH (fastupdate = off) {index_tablespace};\n";
+     }
+ 


=====================================
debian/patches/0001-Bugfix-Disable-expire-in-flex-output-when-not-used.patch
=====================================
@@ -0,0 +1,31 @@
+Description: Bugfix: Disable expire in flex output when not used
+ If we don't have expire enabled we never need to create an expire list.
+ But as a side effect of the two-stage processing we created such a list
+ which costs a lot of time and RAM. This commit disables this which
+ speeds up processing considerably.
+Author: Jochen Topf <jochen at topf.org>
+Origin: https://github.com/openstreetmap/osm2pgsql/issues/1436
+Bug: https://github.com/openstreetmap/osm2pgsql/issues/1436
+
+--- a/src/expire-tiles.hpp
++++ b/src/expire-tiles.hpp
+@@ -60,6 +60,8 @@ struct expire_tiles
+     expire_tiles(uint32_t maxzoom, double maxbbox,
+                  const std::shared_ptr<reprojection> &projection);
+ 
++    bool enabled() const noexcept { return maxzoom != 0; }
++
+     int from_bbox(double min_lon, double min_lat, double max_lon,
+                   double max_lat);
+     void from_wkb(char const *wkb, osmid_t osm_id);
+--- a/src/output-flex.cpp
++++ b/src/output-flex.cpp
+@@ -1289,7 +1289,7 @@ void output_flex_t::delete_from_table(ta
+     assert(table_connection);
+     auto const id = table_connection->table().map_id(type, osm_id);
+ 
+-    if (table_connection->table().has_geom_column()) {
++    if (m_expire.enabled() && table_connection->table().has_geom_column()) {
+         auto const result = table_connection->get_geom_by_id(type, id);
+ 
+         if (result.num_tuples() == 0) {


=====================================
debian/patches/series
=====================================
@@ -0,0 +1,2 @@
+0001-Bugfix-Disable-expire-in-flex-output-when-not-used.patch
+0001-Bug-fix-Remove-schema-name-from-CREATE-INDEX.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/osm2pgsql/-/compare/167865e5f7bb577e0bb841c418a3b2ed8bde013e...3a100fd35f435ed29bb08f142d34766ab4c6f589

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/osm2pgsql/-/compare/167865e5f7bb577e0bb841c418a3b2ed8bde013e...3a100fd35f435ed29bb08f142d34766ab4c6f589
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20210408/291d933d/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list