-
Notifications
You must be signed in to change notification settings - Fork 286
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
Fix Transaction ID counter for Postgres backups #1630
Labels
area/CLI
Affects the command line
area/datastore
Affects the storage system
area/tooling
Affects the dev or user toolchain (e.g. tests, ci, build tools)
kind/tech debt
Addresses legacy code/decisions
Comments
jzelinskie
added
area/CLI
Affects the command line
area/datastore
Affects the storage system
area/tooling
Affects the dev or user toolchain (e.g. tests, ci, build tools)
kind/tech debt
Addresses legacy code/decisions
labels
Oct 31, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 9, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 9, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 9, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 13, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 15, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 15, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 15, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 15, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 16, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 16, 2023
josephschorr
added a commit
to josephschorr/spicedb
that referenced
this issue
Nov 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/CLI
Affects the command line
area/datastore
Affects the storage system
area/tooling
Affects the dev or user toolchain (e.g. tests, ci, build tools)
kind/tech debt
Addresses legacy code/decisions
Problem Statement
When performing a backup of a Postgres database, Postgres does not backup/restore the transaction ID counter.
Because SpiceDB depends on this value being set, we need some means of setting the counter or incrementing it to the place where the previous database counter was set.
Solution Brainstorm
After some investigation @jakedt was able to produce a benchmark for batching the creation of transactions to increment the Postgres transaction ID counter. With batch size of 10k its ~2.6 seconds per million transactions. This could probably use a bit more investigation to find an ideal batch size.
After this explored, we need to introduce this into SpiceDB.
A "repair" command could be added as maybe a part of a larger command for sanity-checking configurations (e.g.
spicedb status --repair
)The text was updated successfully, but these errors were encountered: