Skip to content

sql,backupccl: partial stats are not included in backup #95056

@stevendanna

Description

@stevendanna

Describe the problem

The backup code uses the stats cache to retrieve table statistics for backup.

tableStatisticsAcc, err := statsCache.GetTableStats(ctx, tableDesc)

As a result, we only back up what the stats cache returns and it doesn't return partial statistics.

return fullStatsList, nil

While it does return "merged" statistics which at least contains the estimates produce in those statistics, those will be excluded from the backup after #94992.

One option here is to stop using the stats cache for retrieving the statistics and instead create some new, more appropriate API.

Jira issue: CRDB-23298

Metadata

Metadata

Assignees

Labels

A-disaster-recoveryA-sql-table-statsTable statistics (and their automatic refresh).C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-disaster-recovery

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions