Do no reset bounded before incremental sort rescan
authorTomas Vondra <tomas.vondra@postgresql.org>
Sat, 9 May 2020 17:41:36 +0000 (19:41 +0200)
committerTomas Vondra <tomas.vondra@postgresql.org>
Sat, 9 May 2020 17:41:36 +0000 (19:41 +0200)
commit9155b4be9a13038d59a7a09a27b7fbce3819eb08
treef7b0d67574639e59721e2b28cc24854aaeb497d9
parentc4427226483c78618ba45eff34917400a77718a5
Do no reset bounded before incremental sort rescan

ExecReScanIncrementalSort was resetting bounded=false, which means the
optimization would be disabled on all rescans. This happens because
ExecSetTupleBound is called before the rescan, not after it.

Author: James Coleman
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/20200414065336.GI1492@paquier.xyz
src/backend/executor/nodeIncrementalSort.c