Fix deadlock problem with extend query.
authorYoshiyuki Asaba <y-asaba at pgfoundry.org>
Thu, 22 Jun 2006 08:17:16 +0000 (08:17 +0000)
committerYoshiyuki Asaba <y-asaba at pgfoundry.org>
Thu, 22 Jun 2006 08:17:16 +0000 (08:17 +0000)
Call synchronize() in Execute() if replication_strict is true.

pool_process_query.c

index 451b537b6da22e01e973d7fdba77d7e3cfb82744..b6c0cb584662768bce2044ae96ffd79bdd717245 100644 (file)
@@ -782,6 +782,12 @@ static POOL_STATUS Execute(POOL_CONNECTION *frontend,
 
                if (!REPLICATION)
                        break;
+               else if (pool_config.replication_strict)
+               {
+                       pool_debug("waiting for backend completing the query");
+                       if (synchronize(cp))
+                               return POOL_END;
+               }
        }
 
        while ((kind = pool_read_kind(backend)),