mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Ensure interleaved_parts field is always initialized
This field was recently added in db632fbca
, however that commit missed one
place where it should have initialized the new field to NULL. The missed
location is where the PartitionBoundInfo is created for partition-wise
join relations. Technically there could be interleaved partitions in a
partition-wise join relation, but currently the only optimization we use
this field for only does so for base rels and other member rels. So just
document that we don't populate this field for join rels.
Reported-by: Amit Langote
Author: Amit Langote, David Rowley
Reviewed-by: Amit Langote, David Rowley
Discussion: https://postgr.es/m/CA+HiwqE76Rps24kwHsd2Cr82Ua07tJC9t9reG0c7ScX9n_xrEA@mail.gmail.com
This commit is contained in:
@@ -2564,6 +2564,9 @@ build_merged_partition_bounds(char strategy, List *merged_datums,
|
||||
merged_bounds->kind = NULL;
|
||||
}
|
||||
|
||||
/* interleaved_parts is always NULL for join relations. */
|
||||
merged_bounds->interleaved_parts = NULL;
|
||||
|
||||
Assert(list_length(merged_indexes) == ndatums);
|
||||
merged_bounds->nindexes = ndatums;
|
||||
merged_bounds->indexes = (int *) palloc(sizeof(int) * ndatums);
|
||||
|
Reference in New Issue
Block a user