This is an automated email from the git hooks/post-receive script. sebastic-guest pushed a commit to branch master in repository osmosis.
commit 13cb9ac84b270dda0636812f156595848a755a61 Author: Bas Couwenberg <[email protected]> Date: Thu Apr 10 20:20:05 2014 +0200 Add patch from upstream master branch: 0001-Use-ALTER-TABLE-.-CLUSTER-ON-statements-to-set-what-.patch --- ...ABLE-.-CLUSTER-ON-statements-to-set-what-.patch | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/debian/patches/0001-Use-ALTER-TABLE-.-CLUSTER-ON-statements-to-set-what-.patch b/debian/patches/0001-Use-ALTER-TABLE-.-CLUSTER-ON-statements-to-set-what-.patch new file mode 100644 index 0000000..4bc9aec --- /dev/null +++ b/debian/patches/0001-Use-ALTER-TABLE-.-CLUSTER-ON-statements-to-set-what-.patch @@ -0,0 +1,63 @@ +From 789dc316cefb6208390e4376f66740406860a20a Mon Sep 17 00:00:00 2001 +From: Paul Norman <[email protected]> +Date: Thu, 30 May 2013 14:56:44 -0700 +Subject: Use ALTER TABLE ... CLUSTER ON statements to set what index to + CLUSTER on. +Origin: https://github.com/openstreetmap/osmosis/commit/789dc316cefb6208390e4376f66740406860a20a + +This way it gets set even if the DB is not immediately CLUSTERed and the entire database can be re-CLUSTERed with just CLUSTER; + +Note: CLUSTERing nodes on a full-planet database probably isn't practical. + +--- a/package/script/pgsnapshot_load_0.6.sql ++++ b/package/script/pgsnapshot_load_0.6.sql +@@ -36,6 +36,10 @@ CREATE INDEX idx_nodes_geom ON nodes USI + CREATE INDEX idx_way_nodes_node_id ON way_nodes USING btree (node_id); + CREATE INDEX idx_relation_members_member_id_and_type ON relation_members USING btree (member_id, member_type); + ++ALTER TABLE ONLY nodes CLUSTER ON idx_nodes_geom; ++ALTER TABLE ONLY way_nodes CLUSTER ON pk_way_nodes; ++ALTER TABLE ONLY relation_members CLUSTER ON pk_relation_members; ++ + -- Uncomment these if bbox or linestring columns are needed and the COPY files do not include them. + + -- Update the bbox column of the way table. +@@ -60,11 +64,16 @@ UPDATE ways w SET linestring = ( + CREATE INDEX idx_ways_bbox ON ways USING gist (bbox); + CREATE INDEX idx_ways_linestring ON ways USING gist (linestring); + ++ALTER TABLE ONLY ways CLUSTER ON idx_ways_bbox; ++ALTER TABLE ONLY ways CLUSTER ON idx_ways_linestring; ++ + -- Optional: CLUSTER imported tables. CLUSTER takes a significant amount of time to run and a + -- significant amount of free disk space but speeds up some queries. + +---CLUSTER nodes USING idx_nodes_geom; +---CLUSTER ways USING idx_ways_linestring; ++--CLUSTER nodes; ++--CLUSTER ways; ++ ++-- It is not necessary to CLUSTER way_nodes or relation_members after the initial load but you might want to do so later on + + -- Perform database maintenance due to large database changes. + ANALYZE; +--- a/package/script/pgsnapshot_schema_0.6.sql ++++ b/package/script/pgsnapshot_schema_0.6.sql +@@ -108,9 +108,15 @@ CREATE INDEX idx_way_nodes_node_id ON wa + CREATE INDEX idx_relation_members_member_id_and_type ON relation_members USING btree (member_id, member_type); + + +--- Cluster tables by geographical location. +-CLUSTER nodes USING idx_nodes_geom; ++-- Set to cluster nodes by geographical location. ++ALTER TABLE ONLY nodes CLUSTER ON idx_nodes_geom; + ++-- Set to cluster the tables showing relationship by parent ID and sequence ++ALTER TABLE ONLY way_nodes CLUSTER ON pk_way_nodes; ++ALTER TABLE ONLY relation_members CLUSTER ON pk_relation_members; ++ ++-- There are no sensible CLUSTER orders for users or relations. ++-- Depending on geometry columns different clustings of ways may be desired. + + -- Create the function that provides "unnest" functionality while remaining compatible with 8.3. + CREATE OR REPLACE FUNCTION unnest_bbox_way_nodes() RETURNS void AS $$ -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmosis.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

