1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-22 14:32:25 +03:00

Invent recursive_worktable_factor GUC to replace hard-wired constant.

Up to now, the planner estimated the size of a recursive query's
worktable as 10 times the size of the non-recursive term.  It's hard
to see how to do significantly better than that automatically, but
we can give users control over the multiplier to allow tuning for
specific use-cases.  The default behavior remains the same.

Simon Riggs

Discussion: https://postgr.es/m/CANbhV-EuaLm4H3g0+BSTYHEGxJj3Kht0R+rJ8vT57Dejnh=_nA@mail.gmail.com
This commit is contained in:
Tom Lane
2022-03-24 11:47:41 -04:00
parent a47651447f
commit 0bd7af082a
6 changed files with 44 additions and 3 deletions

View File

@@ -3740,6 +3740,18 @@ static struct config_real ConfigureNamesReal[] =
NULL, NULL, NULL
},
{
{"recursive_worktable_factor", PGC_USERSET, QUERY_TUNING_OTHER,
gettext_noop("Sets the planner's estimate of the average size "
"of a recursive query's working table."),
NULL,
GUC_EXPLAIN
},
&recursive_worktable_factor,
DEFAULT_RECURSIVE_WORKTABLE_FACTOR, 0.001, 1000000.0,
NULL, NULL, NULL
},
{
{"geqo_selection_bias", PGC_USERSET, QUERY_TUNING_GEQO,
gettext_noop("GEQO: selective pressure within the population."),