diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2020-11-03 20:07:23 +0100 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2020-11-03 22:31:57 +0100 |
commit | ebb7ae839d033d0f279670e249f54646a08b8c48 (patch) | |
tree | 96921a9a470206f6df84d4072f6d0fc2dc18b7fe /src/backend/executor/nodeIncrementalSort.c | |
parent | 92f87182f2c617fd420832972b6d0ae4527301c8 (diff) | |
download | postgresql-ebb7ae839d033d0f279670e249f54646a08b8c48.tar.gz postgresql-ebb7ae839d033d0f279670e249f54646a08b8c48.zip |
Fix get_useful_pathkeys_for_relation for volatile expressions
When considering Incremental Sort below a Gather Merge, we need to be
a bit more careful when matching pathkeys to EC members. It's not enough
to find a member whose Vars are all in the current relation's target;
volatile expressions in particular need to be contained in the target,
otherwise it's too early to use the pathkey.
Reported-by: Jaime Casanova
Author: James Coleman
Reviewed-by: Tomas Vondra
Backpatch-through: 13, where the incremental sort code was added
Discussion: https://postgr.es/m/CAJGNTeNaxpXgBVcRhJX%2B2vSbq%2BF2kJqGBcvompmpvXb7pq%2BoFA%40mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeIncrementalSort.c')
0 files changed, 0 insertions, 0 deletions