CockroachDB has SQL close enough to
# spicedb
m
CockroachDB has SQL close enough to Postgres that I think SpiceDB wouldn't need a special driver for it. I'm guessing distinguishing it makes SpiceDB able to do extra. My question is what is that?
e
The biggest difference is that we use CockroachDB's native support for time-travel queries to run queries at a specific snapshot of the datastore. In postgres, we have to do a lot of extra bookkeeping (to know which relationships should be visible at what snapshots) to get the same thing
but cockroach also requires a little extra work to be save, because it is not linearizable since cockroach is a cluster and not just one machine, we also do special handling to ensure the load is distributed evenly over the whole cluster
m
Appreciate the copious documentation. 👍
j
We actually used to run the Postgres datastore driver against CRDB just to see if it was compatible, but we stopped. There's no good reason to do that when the native CRDB datastore exists
m
True enough. How well does SpiceDB work with active/active flavors of Postgres? My DB team has a strong preference for running that instead of CRDB. They're not hostile to CRDB, but it is proving to be a difficult sell if we self-host.
j
I don't think we've experimented with any of the active/active Postgres solutions. SpiceDB uses Postgres's internal transaction IDs which we'd have to investigate for the specific flavor of Postgres you're using.