let analyze runs with NOWAIT option, it prevents self-deadlock in corner cases
[online_analyze.git] / online_analyze.c
index 77c1f8b..90f261c 100644 (file)
@@ -556,7 +556,7 @@ makeAnalyze(Oid relOid, CmdKind operation, int64 naffected)
 #endif
 #else
                        makeRangeVarFromOid(relOid),
-                       VACOPT_ANALYZE | ((online_analyze_verbose) ? VACOPT_VERBOSE : 0),
+                       VACOPT_ANALYZE | VACOPT_NOWAIT | ((online_analyze_verbose) ? VACOPT_VERBOSE : 0),
                        &vacstmt, NULL, true, GetAccessStrategy(BAS_VACUUM)
 #endif
                );