Placement Policy support for dumpling #29371
Labels
component/dumpling
This is related to Dumpling of TiDB.
type/feature-request
Categorizes issue or PR as related to a new feature.
Feature Request
This is part of #18030
Is your feature request related to a problem? Please describe:
Currently dumpling supports dumping tables + data, but it does not yet support correctly dumping tables with a
PLACEMENT POLICY
defined.Placement Policies can be thought of as similar to "Roles". They are globally scoped and save a set of placement options under a common name. See pingcap/docs#6618 for docs.
Describe the feature you'd like:
Dumpling should use the following procedure to dump placement policies:
select distinct policy_name from information_schema.placement_rules;
)SHOW CREATE PLACEMENT POLICY foo
to get the recreatable version of the policy. This should be written to the top of the dump file.SET PLACEMENT_CHECKS=0
to the start of the dump file. This feature was developed with dumpling in mind, since it should be possible to disable failures if a dump is reimported into a newer server which has stricter interpretations of how placement policies should be validated/specified. It also helps if the labels differ on the physical server where data is being restored (since this should not prevent restore - that could be disasterous).Describe alternatives you've considered:
None
Teachability, Documentation, Adoption, Migration Strategy:
It should automatically work assuming the server is a TiDB server.
The text was updated successfully, but these errors were encountered: