sql: improve backward compatibility for ALTER PARTITION ... OF TABLE #40425
Labels
A-partitioning
S-3-ux-surprise
Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
In 19.1, the
ALTER PARTITION p OF TABLE
command will look for a partition namedp
across all of the indexes of a table. When we made partition names index-scoped in #20880, we changed this behavior so thatALTER PARTITION ... OF TABLE
only works on the primary index of the table. To alter an index partition you need to instead runALTER PARTITION p OF INDEX tbl@idx
.This makes a kind of sense because there might be multiple partitions named
p
across indexes. However, we have seen it break backward compatibility in a few cases like #40416, and I'm worried that customers could run into the same issue after they upgrade if they have scripts that use partitioning. I think it might be best if we bring back the old behavior and then only error out if we encounter multiple partitions with the same name.cc @awoods187, does this make sense to you?
The text was updated successfully, but these errors were encountered: