Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee63981

Browse files
committed
Avoid sharing subpath list structure when flattening nested AppendRels.
In some situations the original coding led to corrupting the child AppendRel'ssubpaths list, effectively adding other members of the parent's list to it.This was usually masked because we never made any further use of the child'slist, but given the right combination of circumstances, we could do so. Thevisible symptom would be a relation getting scanned twice, as in bug #5673from David Schmitt.Backpatch to 8.2, which is as far back as the risky coding appears. Theexample submitted by David only fails in 8.4 and later, but I'm not convincedthat there aren't any even-more-obscure cases where 8.2 and 8.3 would fail.
1 parent003788e commitee63981

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/optimizer/path/allpaths.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
425425
childpath=childrel->cheapest_total_path;
426426
if (IsA(childpath,AppendPath))
427427
subpaths=list_concat(subpaths,
428-
((AppendPath*)childpath)->subpaths);
428+
list_copy(((AppendPath*)childpath)->subpaths));
429429
else
430430
subpaths=lappend(subpaths,childpath);
431431

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp