From: Teodor Sigaev Date: Fri, 15 Jun 2018 13:07:48 +0000 (+0300) Subject: fix forcing online analyze in case of analyze command X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=398e7102a28a446eb61cc998d334bb3ce6c96286;p=online_analyze.git fix forcing online analyze in case of analyze command --- diff --git a/online_analyze.c b/online_analyze.c index 3fe4da5..4396550 100644 --- a/online_analyze.c +++ b/online_analyze.c @@ -446,9 +446,10 @@ makeAnalyze(Oid relOid, CmdKind operation, int64 naffected) rstat->tableid = relOid; newTable = true; } - else if (operation == CK_VACUUM) + + if (operation == CK_VACUUM) { - /* force reread becouse vacuum could change n_tuples */ + /* force reread because vacuum could change n_tuples */ rstat->rereadStat = true; return; } @@ -457,6 +458,8 @@ makeAnalyze(Oid relOid, CmdKind operation, int64 naffected) /* only analyze */ rstat->changes_since_analyze = 0; rstat->analyze_timestamp = now; + if (newTable) + rstat->rereadStat = true; return; }