Skip to content

sql: split new indexes in TRUNCATE in new secondary tenants #69499

@ajwerner

Description

@ajwerner

Is your feature request related to a problem? Please describe.

// copySplitPointsToNewIndexes copies any range split points from the indexes
// given by the oldIndexIDs slice to the indexes given by the newIndexIDs slice
// on the table given by the tableID.
// oldIndexIDs and newIndexIDs must be in the same order and be the same length.
func (p *planner) copySplitPointsToNewIndexes(
ctx context.Context,
tableID descpb.ID,
oldIndexIDs []descpb.IndexID,
newIndexIDs []descpb.IndexID,
) error {
if !p.EvalContext().Codec.ForSystemTenant() {
// Can't do any of this direct manipulation of ranges in multi-tenant mode.
return nil
}

Describe the solution you'd like

This might run in to figuring out how we permission telling the system tenant to split.

Jira issue: CRDB-9625

Epic: CRDB-16746

Metadata

Metadata

Assignees

Labels

A-multitenancyRelated to multi-tenancyC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions