Remove `static prune` mode for partition table
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
_(Planned to achieve after the **v9.1** branch is created)_
**Is your feature request related to a problem? Please describe:**
- The `static prune` mode encountered many issues previously, and its presence offered no benefits, so we can consider removing it. The issue lists shown below, but not limited to this:
- https://github.com/pingcap/tidb/issues/54667
- https://github.com/pingcap/tidb/issues/52282
- https://github.com/pingcap/tidb/issues/51873
- https://github.com/pingcap/tidb/issues/45757
- https://github.com/pingcap/tidb/issues/35295
- And also `static prune` mode has many related codes and test cases in TiDB repo. After removing those codes, it could make repo cleaner.
- `dynamic prune` mode already became the default mode since v6.5, which I think is enough to prove its stability.
**Describe the feature you'd like:**
- Remove `static prune` related codes.
- Deprecated `tidb_partition_prune_mode` session variable and always set it to `dynamic`.
**Describe alternatives you've considered:**
None
**Teachability, Documentation, Adoption, Migration Strategy:**
Need remove `static prune` related docs, I haven't thought of anything else yet.
Because there are many related codes, maybe we could split this issue to some PRs, including but not limited to the ones listed below
- [x] https://github.com/pingcap/tidb/pull/56543
- [ ] Let `tidb_partition_prune_mode` always set to `dynamic`
- [ ] https://github.com/pingcap/tidb/issues/33002
- [ ] Remove related codes in `analyze` pkg
Some issues can close after this PR finish:
- [ ] https://github.com/pingcap/tidb/issues/27241
- [ ] https://github.com/pingcap/tidb/issues/23582
- [ ] https://github.com/pingcap/tidb/issues/40470
- [ ] https://github.com/pingcap/tidb/issues/33000
- [ ] https://github.com/pingcap/tidb/issues/58025
- [ ] https://github.com/pingcap/tidb/issues/22063
Contributor guide
Assessment
This issue has not been assessed yet.