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[email protected]
if (node->transfer_tuple != NULL)
ExecClearTuple(node->transfer_tuple);
- node->bounded = false;
node->outerNodeDone = false;
node->n_fullsort_remaining = 0;
node->bound_Done = 0;