summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistget.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-08-04 11:18:45 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-08-04 11:18:45 -0400
commit489247b0e615592111226297a0564e11616361a5 (patch)
treeb0586a8b03cbbeed0aa16b12b599de658adf9466 /src/backend/access/gist/gistget.c
parent69edf4f8802247209e77f69e089799b3d83c13a4 (diff)
downloadpostgresql-489247b0e615592111226297a0564e11616361a5.tar.gz
Improve pruning of a default partition
When querying a partitioned table containing a default partition, we were wrongly deciding to include it in the scan too early in the process, failing to exclude it in some cases. If we reinterpret the PruneStepResult.scan_default flag slightly, we can do a better job at detecting that it can be excluded. The change is that we avoid setting the flag for that pruning step unless the step absolutely requires the default partition to be scanned (in contrast with the previous arrangement, which was to set it unless the step was able to prune it). So get_matching_partitions() must explicitly check the partition that each returned bound value corresponds to in order to determine whether the default one needs to be included, rather than relying on the flag from the final step result. Author: Yuzuko Hosoya <hosoya.yuzuko@lab.ntt.co.jp> Reviewed-by: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> Discussion: https://postgr.es/m/00e601d4ca86$932b8bc0$b982a340$@lab.ntt.co.jp
Diffstat (limited to 'src/backend/access/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions