aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2020-04-23 00:15:24 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2020-04-23 00:15:24 +0200
commitde0dc1a84710f127fdd40f87e783797cc2d69a77 (patch)
treea7295ae3bb4cb2a3a387a56ecca784c73019b295 /src/backend/access/transam/commit_ts.c
parent92c12e46d5f1e25fc85608a6d6a19b8f5ea02600 (diff)
downloadpostgresql-de0dc1a84710f127fdd40f87e783797cc2d69a77.tar.gz
postgresql-de0dc1a84710f127fdd40f87e783797cc2d69a77.zip
Fix cost_incremental_sort for expressions with varno 0
When estimating the number of pre-sorted groups in cost_incremental_sort we must not pass Vars with varno 0 to estimate_num_groups, which would cause failues in find_base_rel. This may happen when sorting output of set operations, thanks to generate_append_tlist. Unlike recurse_set_operations we can't easily access the original target list, so if we find any Vars with varno 0, we fall back to the default estimate DEFAULT_NUM_DISTINCT. Reported-by: Justin Pryzby Discussion: https://postgr.es/m/20200411214639.GK2228%40telsasoft.com
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions