There are many flavors of postgresql which graphql-engine might support out of the box or with slight configuration/modifications. We need to document for each of them.
TimescaleDB
Yugabyte
Aurora - Postgres
CockroachDB
CitusDB
CrateDB
PipelineDB
Current status (note that these have not been officially tested by Hasura and are based on empirical usage):
CockroachDB hasn't supported user defined schema
{"internal":{"statement":"CREATE SCHEMA hdb_catalog","prepared":false,"error":{"exec_status":"FatalError","hint":"See: https://github.com/cockroachdb/cockroach/issues/26443","message":"unimplemented at or near \"hdb_catalog\"","status_code":"0A000","description":"source SQL:\nCREATE SCHEMA hdb_catalog\n ^"},"arguments":[]},"path":"$","error":"postgres query error","code":"postgres-error"}
I could imagine scenarios where as a start-up scales they might shift to CockroachDB from Postgres. From a read and most of a write point of view would it not remain compatible with GraphQL? How frequently are user defined schema changes required in standard Hasura + Postgres operation?
The other feature that would disappear is the live subscription capability but that is an optional extra and Hasura has strong value even without it.
Thanks for reporting this @duyleekun.
@Smerity Hasura stores all the metadata on a separate schema called hdb_catalog.
Looks like this is a planned feature on CockroachDB. Should land soon.
See https://github.com/cockroachdb/cockroach/issues/26443 and https://github.com/cockroachdb/cockroach/pull/30916
Hey Guys - is it possible to do the creation of the hdb_catalog as a create db versus create schema to support cockroach?
@Disturbing It will be a big change to the internals. Not something we can immediately support.
Ok, thanks for the quick response.
Out of curiosity, is there a specific reason why you guys when with SCHEMA
Table? I personally dont have much knowledge over this, but would love to
hear your perspective
On Wed, Mar 27, 2019 at 5:26 PM Shahidh K Muhammed notifications@github.com
wrote:
@Disturbing https://github.com/Disturbing It will be a big change to
the internals. Not something we can immediately support.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hasura/graphql-engine/issues/411#issuecomment-477058089,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACQev7cNuU1qDdvSEfOhe8VesUH95rQxks5vazlRgaJpZM4WjIgY
.
@Disturbing When Hasura connects to a Postgres instance, the connection is database scoped. It cannot access another database outside of the given one. Hence the logical choice would be to use the namespacing available within a database which is a schema.
Thanks - makes sense.
Hasura is now supported by YugaByte (Postgres-based distributed SQL DB):
https://docs.yugabyte.com/latest/develop/graphql/hasura
(I haven't personally tested this yet)
Looks like this is a planned feature on CockroachDB. Should land soon.
See cockroachdb/cockroach#26443 and cockroachdb/cockroach#30916
FYI for others who are waiting for this: CockroachDB might implement user-defined schemas sometime in 2020: https://github.com/cockroachdb/cockroach/pull/30916#issuecomment-600722261
Do all features of Hasura work on Yugabyte? What about this issue: https://github.com/YugaByte/yugabyte-db/issues/1872?
CockroachDB user-defined schemas RFC got merged in May. https://github.com/cockroachdb/cockroach/pull/30916
Should Hasura works on CockroachDB now?
Most helpful comment
CockroachDB user-defined schemas RFC got merged in May. https://github.com/cockroachdb/cockroach/pull/30916
Should Hasura works on CockroachDB now?