v.21.11Improvements

Respect Default Database Setting for ALTER TABLE ON CLUSTER Partition Operations

Respect default database setting for ALTER TABLE ... ON CLUSTER ... REPLACE/MOVE PARTITION FROM/TO ... #28955 (anneji-dev).
Ensure that ALTER TABLE commands with ON CLUSTER for REPLACE/MOVE PARTITION operations respect the default database setting.

Why it matters

This feature addresses the issue where ALTER TABLE ... ON CLUSTER ... REPLACE/MOVE PARTITION FROM/TO commands did not consistently use the default database context. By respecting the default database setting, it improves accuracy and convenience for users managing partitions across clusters, reducing errors related to database selection.

How to use it

When executing ALTER TABLE ... ON CLUSTER ... REPLACE/MOVE PARTITION FROM/TO commands, the system now automatically applies the default database setting configured in the session or environment. Users do not need to explicitly specify the database if the default is already set.