diff options
| author | Tom Lane | 2016-06-06 21:44:17 +0000 |
|---|---|---|
| committer | Tom Lane | 2016-06-06 21:44:17 +0000 |
| commit | a4400c251f93df7d4f5760ad633c041fc5dae376 (patch) | |
| tree | 717a4542888380e8ec458c9bcb0f9c747e87e3ab /src/include/pgstat.h | |
| parent | 53c2601a59fc18bd33713162504401f7fec2e2f2 (diff) | |
Don't reset changes_since_analyze after a selective-columns ANALYZE.
If we ANALYZE only selected columns of a table, we should not postpone
auto-analyze because of that; other columns may well still need stats
updates. As committed, the counter is left alone if a column list is
given, whether or not it includes all analyzable columns of the table.
Per complaint from Tomasz Ostrowski.
It's been like this a long time, so back-patch to all supported branches.
Report: <ef99c1bd-ff60-5f32-2733-c7b504eb960c@ato.waw.pl>
Diffstat (limited to 'src/include/pgstat.h')
| -rw-r--r-- | src/include/pgstat.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 79bf196845f..205cba3762d 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -376,6 +376,7 @@ typedef struct PgStat_MsgAnalyze Oid m_databaseid; Oid m_tableoid; bool m_autovacuum; + bool m_resetcounter; TimestampTz m_analyzetime; PgStat_Counter m_live_tuples; PgStat_Counter m_dead_tuples; @@ -862,7 +863,8 @@ extern void pgstat_report_autovac(Oid dboid); extern void pgstat_report_vacuum(Oid tableoid, bool shared, PgStat_Counter livetuples, PgStat_Counter deadtuples); extern void pgstat_report_analyze(Relation rel, - PgStat_Counter livetuples, PgStat_Counter deadtuples); + PgStat_Counter livetuples, PgStat_Counter deadtuples, + bool resetcounter); extern void pgstat_report_recovery_conflict(int reason); extern void pgstat_report_deadlock(void); |
