v.24.12New Feature

Add "enforce_index_structure_match_on_partition_manipulation" Setting for Table Attachments

Add new setting enforce_index_structure_match_on_partition_manipulation to allow attach when the set of source table's projections and secondary indices is a subset of those in the target table. Close #70602. #70603 (zwy991114).
Introduces the enforce_index_structure_match_on_partition_manipulation setting to allow attaching partitions when the source table's projections and secondary indices are a subset of those in the target table.

Why it matters

This feature addresses the limitation where partition attachment required exact matching of projections and secondary indices between source and target tables. By allowing the source's indices to be a subset of the target's, it increases flexibility in partition manipulations and simplifies merging data from tables with compatible but not identical index structures.

How to use it

Enable the feature by setting enforce_index_structure_match_on_partition_manipulation to false before performing partition attach operations. This relaxes the strict index structure matching rule and permits attaching when the source indices are a subset of the target's.