]> granicus.if.org Git - postgresql/commit
Fix ANALYZE's ancient deficiency of not trying to collect stats for expression
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 1 Aug 2010 22:38:20 +0000 (22:38 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 1 Aug 2010 22:38:20 +0000 (22:38 +0000)
commit2fa68e2a351b44b01a30c8f72bedbe8e93b4fd46
treeff4d8e9e1a5736c0586ec6c5da1a53e0fdf05048
parent7354dbfa8c2f88dfea1a93960e04d1d7544d38c3
Fix ANALYZE's ancient deficiency of not trying to collect stats for expression
indexes when the index column type (the opclass opckeytype) is different from
the expression's datatype.  When coded, this limitation wasn't worth worrying
about because we had no intelligence to speak of in stats collection for the
datatypes used by such opclasses.  However, now that there's non-toy
estimation capability for tsvector queries, it amounts to a bug that ANALYZE
fails to do this.

The fix changes struct VacAttrStats, and therefore constitutes an API break
for custom typanalyze functions.  Therefore we can't back-patch it into
released branches, but it was agreed that 9.0 isn't yet frozen hard enough
to make such a change unacceptable.  Ergo, back-patch to 9.0 but no further.
The API break had better be mentioned in 9.0 release notes.
src/backend/commands/analyze.c
src/include/commands/vacuum.h