Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Add compatibility with CockroachDB #91

Closed
stevecookform3 opened this issue Jul 17, 2019 · 4 comments
Closed

Add compatibility with CockroachDB #91

stevecookform3 opened this issue Jul 17, 2019 · 4 comments

Comments

@stevecookform3
Copy link

Cockroachdb (https://github.com/cockroachdb/cockroach) is compatible with the postgres protocol, however the provider currently fails validating the versions

Error initializing PostgreSQL client: error detecting capabilities: error parsing version: Invalid character(s) found in major number "CCL"

Probably just requires tweaking in https://github.com/terraform-providers/terraform-provider-postgresql/blob/master/postgresql/config.go

@robert-s-lee
Copy link

CRDB returns the following

root=# select version();
                                       version
--------------------------------------------------------------------------------------
 CockroachDB CCL v19.1.3 (x86_64-apple-darwin14, built 2019/07/08 18:19:30, go1.11.6)

@cyrilgdn
Copy link
Contributor

Hi @stevecookform3 , thanks for opening this issue.

We could fix the version detection but the problem is that we need a "Postgresql" version to determine which features are enabled or not (see https://github.com/terraform-providers/terraform-provider-postgresql/blob/master/postgresql/config.go#L42-L73)

I don't know CockroachDB at all yet, is there some kind of compatibility mapping ? (Like version X of CockroachDB is compatible with version Y of Postgresql)

Meanwhile, in the next version of this provider (which will be released in the next days), you should be able to set the expected_version to a Postgres version (e.g: 12.1) in the provider configuration. This will avoid the automatic version detection.

However, I don't known CockroachDB and I don't know what's the compatibility

@stevecookform3
Copy link
Author

stevecookform3 commented Mar 23, 2020

being able to override this with expected_version sounds like a good workaround for now.
(not least because i dont think terraform is the right place to maintain compatibility tables on third party databases)

@ghost ghost removed the waiting-response label Mar 23, 2020
@cyrilgdn
Copy link
Contributor

cyrilgdn commented Apr 4, 2020

being able to override this with expected_version sounds like a good workaround for now.
(not least because i dont think terraform is the right place to maintain compatibility tables on third party databases)

Thanks for your answer. I close this issue for now.
(I'll try to test CockroachDB anyway one day if I find time and courage 😄 )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants