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

Commite1a0f6a

Browse files
committed
Adjust overly strict Assert
3373c71 changed how we determine EquivalenceClasses for relations andadded an Assert to ensure all relations mentioned in each EC's ec_relidswas a RELOPT_BASEREL. However, the join removal code may remove a LEFTJOIN and since it does not clean up EC members belonging to the removedrelations it can leave RELOPT_DEADREL rels in ec_relids.Fix this by adjusting the Assert to allow RELOPT_DEADREL rels too.Reported-by: sqlsmith via Andreas SeltenreichDiscussion:https://postgr.es/m/87y30r8sls.fsf@ansel.ydns.eu
1 parent330cafd commite1a0f6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,8 @@ get_eclass_for_sort_expr(PlannerInfo *root,
761761
{
762762
RelOptInfo*rel=root->simple_rel_array[i];
763763

764-
Assert(rel->reloptkind==RELOPT_BASEREL);
764+
Assert(rel->reloptkind==RELOPT_BASEREL||
765+
rel->reloptkind==RELOPT_DEADREL);
765766

766767
rel->eclass_indexes=bms_add_member(rel->eclass_indexes,
767768
ec_index);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp