Invent recursive_worktable_factor GUC to replace hard-wired constant.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 24 Mar 2022 15:47:41 +0000 (11:47 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 24 Mar 2022 15:47:41 +0000 (11:47 -0400)
commit0bd7af082ace135581bb13a6bd2d88e68c66a3e0
tree412ad873ef762b761baaab0577cb4d36b6c0a240
parenta47651447f01562dac2e007db03733e750d45b6b
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
doc/src/sgml/config.sgml
src/backend/optimizer/path/costsize.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/optimizer/cost.h
src/include/optimizer/optimizer.h