Skip to content

Commit 59ef49d

Browse files
committed
Remove bogus Assert in make_partitionedrel_pruneinfo().
This Assert thought that a given rel couldn't be both leaf and non-leaf, but it turns out that in some unusual plan trees that's wrong, so remove it. The lack of testing for cases like that is quite concerning --- there is little reason for confidence that there aren't other bugs in the area. But developing a stable test case seems rather difficult, and in any case we don't need this Assert. David Rowley Discussion: https://postgr.es/m/CAJGNTeOkdk=UVuMugmKL7M=owgt4nNr1wjxMg1F+mHsXyLCzFA@mail.gmail.com
1 parent 313cbdc commit 59ef49d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/backend/partitioning/partprune.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,6 @@ make_partitionedrel_pruneinfo(PlannerInfo *root, RelOptInfo *parentrel,
347347
Assert(rti < root->simple_rel_array_size);
348348
/* No duplicates please */
349349
Assert(relid_subpart_map[rti] == 0);
350-
/* Same rel cannot be both leaf and non-leaf */
351-
Assert(relid_subplan_map[rti] == 0);
352350

353351
relid_subpart_map[rti] = i++;
354352
}

0 commit comments

Comments
 (0)