backfill: index backfills should write rows at their current MVCC timestamp #63741
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
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.
The text was updated successfully, but these errors were encountered: