Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backfill: index backfills should write rows at their current MVCC timestamp #63741

Closed
ajwerner opened this issue Apr 15, 2021 · 1 comment
Closed
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@ajwerner
Copy link
Contributor

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

Today the index backfiller writes batches using the MVCC timestamp at which it read the row. This, I suspect, was done to make incremental backups seem to work; they are already broken (#62585). The new schema change logic intends to perform schema changes by populating a new primary index (#47989). Changefeeds are going to work okay with this for the most part because they should plan themselves using the descriptors as of their start time and then restart when the primary index changes. The odd behavior will come in when using with diff. Today's behavior will show the before timestamp as corresponding to the the timestamp at which the old row was read for backfill. That's a bizarre timestamp. If we maintained the MVCC timestamp, that'd be relatively sane. An oddity arises if you got a logical backfill due to the schema change.

Describe the solution you'd like

Use the row MVCC timestamp when populating the index.

Additional context

If we ever expose the history of versions and want the timestamps to be meaningful across schema changes, we need to do this.

@ajwerner ajwerner added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Apr 15, 2021
@ajwerner
Copy link
Contributor Author

ajwerner commented Nov 3, 2021

This is never going to happen in the new world of immutable history.

@ajwerner ajwerner closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

1 participant