Liquibase Redshift Connectivity

Hi All,

I am not able to run liquibase on Amazon Redshift. Getting the below error :

[2022-05-27 10:52:56] WARNING [liquibase.database] Unknown database: Redshift
[2022-05-27 10:53:02] SEVERE [liquibase.integration] ERROR: current transaction is aborted, commands ignored until end of transaction block
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: ERROR: current transaction is aborted, commands ignored until end of transaction block [Failed SQL: (0) CREATE TABLE liquibase.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]

Followed the below for jdbc and extension download :

https://repo1.maven.org/maven2/org/liquibase/ext/liquibase-redshift/3.10.1/liquibase-redshift-3.10.1.jar
https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.7/redshift-jdbc42-2.1.0.7.zip

We do support Redshift, so it looks like this might be a bug. If it’s persistent, please consider opening a bug report https://www.liquibase.org/community/contribute/report-bugs

Hi @amandeep Can you try using the latest version of the extension and Liquibase?
Looks like you are using the Liquibase 3.10.1 extension. Which I assume means you are using Liquibase 3.10.1 as well

This is an old thread, but were there ever resolution steps? I’m getting the same error when trying to use a GitHub action with Redshift.

Versions:
Action - liquibase-github-actions/update@v4.20.0
Liquibase Redshift - liquibase-redshift-4.20.0.jar
Redshift Jar - redshift-jdbc42-2.1.0.12.jar

If you are getting the “Unknown database: Redshift” error, that would indicate the extension doesn’t recognize what you are connecting to as Redshift. The code looks for “redshift” or port 5439 in the connection URL. Optionally, you could set the system property “liquibase.ext.redshift.force” to true. You can see the code on line 173 here liquibase-redshift/RedshiftDatabase.java at main · liquibase/liquibase-redshift · GitHub. Does that help?

Thank you for the reply. Do I need to have a custom build of the container to make this all work? I’m currently pointing my GitHub action to liquibase-github-actions/update@v4.20.0.

I have a successful connection but see the warning about Redshift not being found and then it appears it can’t create the change log or the lock file.

My guess is even though in my classpath I’m pointing to liquibase-redshift-4.20.0.jar it isn’t doing anything with that file.

I looked at adding liquibase.ext.redshift.force to one of the parameters in my GitHub action but don’t see that as an available option. I’m probably missing one simple instruction somewhere.

I’m also looking for an answer to this question… Does the liquibase github action support redshift?
I get this error:

Liquibase Version: 4.21.1
Liquibase Open Source 4.21.1 by Liquibase
Unexpected error running Liquibase: Cannot find database driver: com.amazon.redshift.jdbc42.Driver

This seems to indicate that the github action does not support redshift: