let analyze runs with NOWAIT option, it prevents self-deadlock in corner cases
authorTeodor Sigaev <teodor@sigaev.ru>
Fri, 25 Jan 2019 10:54:44 +0000 (13:54 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Fri, 25 Jan 2019 10:54:44 +0000 (13:54 +0300)
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
                );