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

Commit16239c5

Browse files
committed
Ensure interleaved_parts field is always initialized
This field was recently added indb632fb, however that commit missed oneplace where it should have initialized the new field to NULL. The missedlocation is where the PartitionBoundInfo is created for partition-wisejoin relations. Technically there could be interleaved partitions in apartition-wise join relation, but currently the only optimization we usethis field for only does so for base rels and other member rels. So justdocument that we don't populate this field for join rels.Reported-by: Amit LangoteAuthor: Amit Langote, David RowleyReviewed-by: Amit Langote, David RowleyDiscussion:https://postgr.es/m/CA+HiwqE76Rps24kwHsd2Cr82Ua07tJC9t9reG0c7ScX9n_xrEA@mail.gmail.com
1 parent20f8671 commit16239c5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎src/backend/partitioning/partbounds.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,6 +2564,9 @@ build_merged_partition_bounds(char strategy, List *merged_datums,
25642564
merged_bounds->kind=NULL;
25652565
}
25662566

2567+
/* interleaved_parts is always NULL for join relations. */
2568+
merged_bounds->interleaved_parts=NULL;
2569+
25672570
Assert(list_length(merged_indexes)==ndatums);
25682571
merged_bounds->nindexes=ndatums;
25692572
merged_bounds->indexes= (int*)palloc(sizeof(int)*ndatums);

‎src/include/partitioning/partbounds.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ struct RelOptInfo;/* avoid including pathnodes.h here */
7272
* contain any value that does not belong in another partition. This field
7373
* only serves as proof that a particular partition is not interleaved, not
7474
* proof that it is interleaved. When we're uncertain, we marked the
75-
* partition as interleaved.
75+
* partition as interleaved. The interleaved_parts field is only ever set for
76+
* RELOPT_BASEREL and RELOPT_OTHER_MEMBER_REL, it is always left NULL for join
77+
* relations.
7678
*/
7779
typedefstructPartitionBoundInfoData
7880
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp