[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-385-g9ce11f2

git at osgeo.org git at osgeo.org
Mon Aug 2 11:42:25 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, main has been updated
       via  9ce11f2f4547c215285296389342e5530208ffc6 (commit)
      from  f86f090b0d4efa4b641538debab83014720baea1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9ce11f2f4547c215285296389342e5530208ffc6
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Aug 2 20:42:11 2021 +0200

    Add script to check effects of multiprocess topology population

diff --git a/topology/test/check_multiprocess_topology_population.sh b/topology/test/check_multiprocess_topology_population.sh
new file mode 100755
index 0000000..92b410c
--- /dev/null
+++ b/topology/test/check_multiprocess_topology_population.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# TODO: turn to perl ?
+
+export PGOPTIONS='-c client_min_messages=WARNING';
+PSQL_OPTS="-tA"
+
+cleanup() {
+  #echo 'Cleaning up'
+  psql ${PSQL_OPTS} -c "SELECT NULL FROM DropTopology('mt_topo');" | grep -v '^$'
+}
+
+trap cleanup EXIT
+
+psql ${PSQL_OPTS} -c "SELECT NULL FROM CreateTopology('mt_topo')" > /dev/null
+
+# $RANDOM: random integer between 0 and 32767
+for i in `seq 1 10`; do
+  x=${RANDOM} # requires bash
+  y=${RANDOM}
+  cat <<EOF | psql ${PSQL_OPTS} | grep -v '^$' &
+SELECT NULL FROM
+  topology.TopoGeo_addPolygon(
+    'mt_topo',
+    ST_Buffer(
+      ST_MakePoint(
+        ${x} ,
+        ${y}
+      ),
+      10000
+    )
+  )
+EOF
+  pids[${i}]=$!
+done
+
+# wait for all pids
+for pid in ${pids[*]}; do
+    wait $pid
+done
+
+psql ${PSQL_OPTS} -c "SELECT TopologySummary('mt_topo')" | grep -v '^$'
+psql ${PSQL_OPTS} -c "SELECT * FROM ValidateTopology('mt_topo')" | grep -v '^$'
+

-----------------------------------------------------------------------

Summary of changes:
 .../test/check_multiprocess_topology_population.sh | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100755 topology/test/check_multiprocess_topology_population.sh


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list