[postgis-tickets] [PostGIS] #4684: concurrent topology construction routine may result in invalid topology

PostGIS trac at osgeo.org
Wed Aug 4 14:59:18 PDT 2021


#4684: concurrent topology construction routine may result in invalid topology
-----------------------+---------------------------
  Reporter:  laopsahl  |      Owner:  strk
      Type:  defect    |     Status:  new
  Priority:  medium    |  Milestone:  PostGIS 3.0.4
 Component:  topology  |    Version:  3.0.x
Resolution:            |   Keywords:
-----------------------+---------------------------

Comment (by strk):

 I just learnt that SERIALIZABLE tracking is "pessimistic", that is it may
 give false conflicts (error out more than needed). This may result in
 actually slower performance than forced serialization via locks. A test
 running 16 concurrent transactions each adding a polygon to a topology
 completes in 1 second when serialized while can take 10 times as much when
 using SERIALIZABLE TRANSACTION ISOLATION LEVEL and re-trying after
 sleeping for a random amount of time up to 1 second. Some transactions are
 re-attempted up to 10 times before succeeding:
 {{{
 [strk at c19:/usr/local/src/postgis/postgis(topology-advisory-lock)] time
 topology/test/check_multiprocess_topology_population.sh 2>&1 | grep
 WARNING
 WARNING:  15917 succeeded on attempt 1
 WARNING:  15950 succeeded on attempt 1
 WARNING:  16045 succeeded on attempt 1
 WARNING:  16046 succeeded on attempt 2
 WARNING:  16025 succeeded on attempt 3
 WARNING:  16040 succeeded on attempt 3
 WARNING:  15940 succeeded on attempt 4
 WARNING:  15994 succeeded on attempt 4
 WARNING:  16000 succeeded on attempt 4
 WARNING:  16005 succeeded on attempt 6
 WARNING:  16011 succeeded on attempt 5
 WARNING:  16044 succeeded on attempt 6
 WARNING:  15924 succeeded on attempt 6
 WARNING:  15999 succeeded on attempt 8
 WARNING:  15996 succeeded on attempt 9
 WARNING:  16028 succeeded on attempt 9

 real    0m5.392s
 user    0m0.729s
 sys     0m0.168s
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4684#comment:31>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list