mirror of
https://github.com/postgres/postgres.git
synced 2026-04-13 21:17:00 -04:00
compute_tsvector_stats() detoasted and kept in memory every tsvector value in the sample, but that can be a lot of memory. The original bug report described a case using over 10 gigabytes, with statistics target of 10000 (the maximum). To fix, allocate a separate copy of just the lexemes that we keep around, and free the detoasted tsvector values as we go. This adds some palloc/pfree overhead, when you have a lot of distinct lexemes in the sample, but it's better than running out of memory. Fixes bug #14654 reported by James C. Reviewed by Tom Lane. Backport to all supported versions. Discussion: https://www.postgresql.org/message-id/20170514200602.1451.46797@wrigleys.postgresql.org |
||
|---|---|---|
| .. | ||
| dict.c | ||
| dict_ispell.c | ||
| dict_simple.c | ||
| dict_synonym.c | ||
| dict_thesaurus.c | ||
| hunspell_sample.affix | ||
| ispell_sample.affix | ||
| ispell_sample.dict | ||
| Makefile | ||
| regis.c | ||
| spell.c | ||
| synonym_sample.syn | ||
| thesaurus_sample.ths | ||
| to_tsany.c | ||
| ts_locale.c | ||
| ts_parse.c | ||
| ts_selfuncs.c | ||
| ts_typanalyze.c | ||
| ts_utils.c | ||
| wparser.c | ||
| wparser_def.c | ||