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

sql: use DeleteRange with MVCC range tombstone for schema GC #76105

Closed
erikgrinaker opened this issue Feb 5, 2022 · 2 comments
Closed

sql: use DeleteRange with MVCC range tombstone for schema GC #76105

erikgrinaker opened this issue Feb 5, 2022 · 2 comments
Assignees
Labels
A-schema-changes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@erikgrinaker
Copy link
Contributor

This is the cheap version of #70427.

We can keep the current schema GC system around, but instead of dropping a ClearRange we drop a DeleteRange with an MVCC range tombstone (requires #70415 first). It will then get cleaned up by MVCC GC at some point. This should only be done when a TBD experimental cluster setting and version gate is enabled, which it won't be by default. This will at least preserve MVCC guarantees, enabling incremental tenant backups and streaming cluster replication.

This will be ineffectual until we implement MVCC range tombstone GC in #70414, but we can get the plumbing in place at least. The cluster setting will be marked as experimental anyway, at least to begin with.

@erikgrinaker erikgrinaker added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-schema-changes T-sql-schema-deprecated Use T-sql-foundations instead labels Feb 5, 2022
@postamar
Copy link
Contributor

postamar commented Feb 8, 2022

Duplicate of #70427

@postamar postamar marked this as a duplicate of #70427 Feb 8, 2022
@postamar postamar closed this as completed Feb 8, 2022
@erikgrinaker
Copy link
Contributor Author

erikgrinaker commented Feb 8, 2022

Is it though? This issue is essentially about calling DeleteRange instead of ClearRange, i.e. a simple change, while the other issue is about removing most of the SQL schema GC system entirely and using MVCC GC instead.

Of course, totally up to SQL schema how you want to do this, but I'd like to get some minimal fix in before stability to avoid non-MVCC operations across the board, to enable incremental tenant backups.

@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-schema-deprecated Use T-sql-foundations instead labels May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-changes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

No branches or pull requests

3 participants