-
Notifications
You must be signed in to change notification settings - Fork 258
Description
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:
- compatibility with terraform-provider-postgresql cockroachdb/cockroach#39109
- pg_advisory_xact_lock breaks Cockroach Compatibility #277
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 setexpectedVersion
. 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?