diff options
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 841be37..bd23226 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -1708,8 +1708,13 @@ create_unique_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, pathnode->path.pathkeys = NIL; pathnode->subpath = subpath; - pathnode->in_operators = sjinfo->semi_operators; - pathnode->uniq_exprs = sjinfo->semi_rhs_exprs; + + /* + * Under GEQO, the sjinfo might be short-lived, so we'd better make copies + * of data structures we extract from it. + */ + pathnode->in_operators = copyObject(sjinfo->semi_operators); + pathnode->uniq_exprs = copyObject(sjinfo->semi_rhs_exprs); /* * If the input is a relation and it has a unique index that proves the |