Skip to content

Support PostgreSQL (PGv15) to allow PG and YugabyteDB as Database #9831

Open

Description

CockroachDB began as open source under Apache 2.0 but shifted in 2019 to a restrictive “source-available” license and by 2024 moved entirely to a proprietary-style Enterprise license. The free tier is now limited to companies under $10M revenue with larger deployments requiring paid licenses and mandatory telemetry. As a result, CockroachDB is no longer truly open source and many in the community view its licensing as restrictive compared to alternatives like YugabyteDB which remains fully open source under Apache 2.0.

YugabyteDB offers true PostgreSQL compatibility unlike CockroachDB (PGv15 currently) along with the benefits of high availability and horizontal scalability and the performance to match.

Within the open-source community, there has been a steady and growing migration from CockroachDB to YugabyteDB. CockroachDB’s marketing is far more visible than YugabyteDB so I wanted to highlight YugabyteDB and ensure members of this project are aware of it's existence and the issues surrounding CockroachDB.

Thanks

Activity

  1. huly-github-staging commented on Sep 10, 2025

    @huly-github-staging

    Connected to Huly®: UBERF-13633

  2. ghost changed the title [-]PostgreSQL - YugabyteDB instead of CockroachDB[/-] [+]Support PostgreSQL (PGv15) to allow PG and YugabyteDB as Database[/+] on Sep 29, 2025
  3. bernatvadell commented on Oct 13, 2025

    @bernatvadell

    I'm interested in the proposal made by @crocinsocks. If necessary, I could help with the implementation/adaptation.

    Reviewing the project, I also saw that a custom adapter could be developed, although I'm not sure how to inject it.

    We just deployed Huly and used the official CockroachDB helm, and we keep getting the error that it doesn't have a license configured, and in the "free" version, telemetry is being sent.

  4. DerKnerd commented on Dec 2, 2025

    @DerKnerd

    How is the status on this? I am really interested in Huly, mainly because of integrated test management, but CockroachDB is a very high no go for me.

  5. JohnFrrr commented on Dec 20, 2025

    @JohnFrrr

    I'm also interested, just throwing in my two cents: based on the recently added architecture documentations, we can identify which services contact the database and consequently need to be adapted. This will differ on the self-hosted vs Huly Cloud/Enterprise since some features are not available on the self-hosted deployment:

    Self-hosted deployment:

    • Account --> CockroachDB
    • Workspace --> CockroachDB
    • Transactor --> CockroachDB
    • HulyKVS --> CockroachDB
    • Fulltext --> CockroachDB

    Huly Cloud/Enterprise only:

    • Datalake --> CockroachDB
    • Hulylake --> CockroachDB
  6. JohnFrrr commented on Jan 12, 2026

    @JohnFrrr

    PostgreSQL support was added in yesterday's release!! #10331

  7. crocsinsocks commented on Jan 19, 2026

    @crocsinsocks

    @ArtyomSavchenko thought it best to include you as the author of #10331

    I have tried to deploy using the new PostgresSQL support in #10331 with YugabyteDB v2025.2.0.0-b131 (PGv15) and I am getting errors :

    {"level":"info","message":"Worker handshake happened","operation":"all","region":"","source":"workspace","timestamp":"2026-01-19T10:27:07.264Z","version":{"major":0,"minor":7,"patch":343}}
    {"code":"42601","file":"gram.y","hint":"For example, FROM (SELECT ...) [AS] foo.","level":"error","line":"14342","message":"Failed to set account timezone","name":"PostgresError","position":"15","routine":"base_yyparse","severity":"ERROR","severity_local":"ERROR","source":"🤦‍♂️user","timestamp":"2026-01-19T10:27:09.622Z"}
    {"account":"b486cf00-ff1a-46d1-88ea-672bda6cfbc9","email":"*redacted*","level":"info","message":"Confirming email","normalizedEmail":"*redacted*,"source":"🤦‍♂️user","timestamp":"2026-01-19T10:27:44.780Z"}
    {"account":"b486cf00-ff1a-46d1-88ea-672bda6cfbc9","email":"*redacted*,"level":"info","message":"Email confirmed","source":"🤦‍♂️user","timestamp":"2026-01-19T10:27:45.894Z"}
    {"code":"42601","file":"gram.y","hint":"For example, FROM (SELECT ...) [AS] foo.","level":"error","line":"14342","message":"Failed to set account timezone","name":"PostgresError","position":"15","routine":"base_yyparse","severity":"ERROR","severity_local":"ERROR","source":"🤦‍♂️user","timestamp":"2026-01-19T10:27:49.777Z"}
    {"account":"b486cf00-ff1a-46d1-88ea-672bda6cfbc9","level":"info","message":"Creating workspace record","region":"","source":"🤦‍♂️user","timestamp":"2026-01-19T10:28:02.688Z","workspaceName":"test"}
    {"level":"error","message":"Error while processing account method","method":"createWorkspace","origErr":{"code":"42601","file":"gram.y","hint":"For example, FROM (SELECT ...) [AS] foo.","line":"14342","message":"subquery in FROM must have an alias","name":"PostgresError","position":"15","routine":"base_yyparse","severity":"ERROR","severity_local":"ERROR","stack":"PostgresError: subquery in FROM must have an alias\n    at ErrorResponse (/usr/src/app/bundle.js:65663:31)\n    at handle (/usr/src/app/bundle.js:65420:11)\n    at Socket.data (/usr/src/app/bundle.js:65229:13)\n    at Socket.emit (node:events:519:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at TCP.onStreamRead (node:internal/stream_base_commons:189:23)"},"source":"🤦‍♂️user","status":{"code":"platform:status:InternalServerError","params":{},"severity":"ERROR"},"timestamp":"2026-01-19T10:28:02.734Z"}
    

    Importantly, the focus is on aliases missing from sub queries: PostgresError: subquery in FROM must have an alias.

    I have had the same error with signup process so this isn't specific to creating a workspace and would seem the pure postgres needs a little more tweaking before it is production ready.

    Very excited to see this moving !

    Thanks

    ps. I am the original author

  8. ArtyomSavchenko commented on Jan 19, 2026

    @ArtyomSavchenko
    Contributor

    @crocsinsocks Hey
    I think PostgresSQL 16 should be supported for the main scenarios at this time.
    PostgresSQL 15 and YugabyteDB are not yet fully supported.
    I think we can add support for them soon as well.

  9. MichaelUray commented on Oct 20, 2026

    @MichaelUray
    Contributor

    Checked against the current code: plain PostgreSQL is supported as a database backend now, with PostgreSQL-specific account migrations (server/account/src/collections/postgres/migrations.ts) and a pure-Postgres test deployment (tests/docker-compose.purepg.yaml). PG15/YugabyteDB specifics were not verified separately. If maintainers agree, please consider closing.

  10. MichaelUray commented on Oct 20, 2026

    @MichaelUray
    Contributor

    @app/ — based on the check described above, this looks resolved in the current code. Could you please close this issue if you agree? If you think it is not fixed yet, please describe what still goes wrong (steps, expected vs. actual behaviour), so it can be looked at again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions