Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8b6724

Browse files
author
Vladimir Ershov
committed
Merge branch 'PGPROEE9_6' into PGPROEE9_6_scheduler
2 parentscb933d2 +97b48b4 commitd8b6724

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

‎contrib/online_analyze/online_analyze.c‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,13 +847,36 @@ onlineAnalyzeHookerUtility(
847847
{
848848
VacuumStmt*vac= (VacuumStmt*)parsetree;
849849

850-
tblnames=list_make1(vac->relation);
851-
850+
if(vac->relation)
851+
tblnames=list_make1(vac->relation);
852852
if (vac->options& (VACOPT_VACUUM |VACOPT_FULL |VACOPT_FREEZE))
853+
{
853854
/* optionally with analyze */
854855
op=CK_VACUUM;
856+
857+
/* drop all collected stat */
858+
if (tblnames==NIL)
859+
relstatsInit();
860+
}
855861
elseif (vac->options&VACOPT_ANALYZE)
862+
{
856863
op=CK_ANALYZE;
864+
865+
/* should reset all counters */
866+
if (tblnames==NIL)
867+
{
868+
HASH_SEQ_STATUShs;
869+
OnlineAnalyzeTableStat*rstat;
870+
TimestampTznow=GetCurrentTimestamp();
871+
872+
hash_seq_init(&hs,relstats);
873+
while ((rstat=hash_seq_search(&hs))!=NULL)
874+
{
875+
rstat->changes_since_analyze=0;
876+
rstat->analyze_timestamp=now;
877+
}
878+
}
879+
}
857880
else
858881
tblnames=NIL;
859882
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp