aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/array_typanalyze.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-04-23 22:05:41 -0400
committerRobert Haas <rhaas@postgresql.org>2012-04-23 22:05:41 -0400
commit85efd5f06593b80bbe01e541d78b336c1077213e (patch)
tree4d01fb9a8bdbefd92f69e7aaa8acf3f86b6ac545 /src/backend/utils/adt/array_typanalyze.c
parent9d435d57e1f8ec7e51d40722854252875d8cc6eb (diff)
downloadpostgresql-85efd5f06593b80bbe01e541d78b336c1077213e.tar.gz
postgresql-85efd5f06593b80bbe01e541d78b336c1077213e.zip
Reduce hash size for compute_array_stats, compute_tsvector_stats.
The size is only a hint, but a big hint chews up a lot of memory without apparently improving performance much. Analysis and patch by Noah Misch.
Diffstat (limited to 'src/backend/utils/adt/array_typanalyze.c')
-rw-r--r--src/backend/utils/adt/array_typanalyze.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/array_typanalyze.c b/src/backend/utils/adt/array_typanalyze.c
index ba9873905e2..fa79d9fa6b4 100644
--- a/src/backend/utils/adt/array_typanalyze.c
+++ b/src/backend/utils/adt/array_typanalyze.c
@@ -282,7 +282,7 @@ compute_array_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
elem_hash_ctl.match = element_match;
elem_hash_ctl.hcxt = CurrentMemoryContext;
elements_tab = hash_create("Analyzed elements table",
- bucket_width * 7,
+ num_mcelem,
&elem_hash_ctl,
HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);