Skip to content

Support for Cockroach DB #372

@kylepl

Description

@kylepl

Hi,

I'm attempting to use this provider with Cockroach DB, which aims to be ~Postgres compatible. A few different bugs show that features relied upon by cockroach DB:

I've managed to hack-up a version such that I can at least support the Role resource, and tested it locally (commit). This just a proof-of-concept, but solves my immediate issue.

This provider already has conditional features depending on the version, so my question is, is it reasonable to expand this to support other "near-Postgres" databases? So Cockroach is one, Yugabyte another.

Options I can picture:

  • This is beyond the scope of this Provider, and this will target vanilla Postgres - thus a fork would be reasonable.
  • Extend the conditional features to not just be predicated on the Postgres version, but also on the type of postgres implementation (vanilla vs. cockroach vs. yugabyte vs...).

To add a few notes about how the conditional features could look:

  • The provider right now either deduces the version from SELECT version();, which does not work for Cockroach at least, but users can set expectedVersion. Ideally, parsing for Cockroach and other versions would be supported.
  • The provider would also take a parameter of which implementation it was using - i.e. vanilla or cockroachdb or ...
  • Thus the 'version' would not be the postgres version, but the version of the implementation. This would mean every feature would say, for each implementation, what version it is available at (if any).

Of course, there are questions about the resilience of these other implementations (e.g. adding integration testing with each one).

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions