I am trying to upgrade my original install of 46.6.4 to 50.33.
Postgres version: 13
java.version: 11
Maximum memory available to JVM: 15.7 GB
As far as I can tell from the documentation, I’ve met all the minimum requirements. I’ve backed up my PostgreSQL database and jar file, shut down the services, and swapped to the new jar.
When I start up, I get this error:
INFO liquibase.changelog :: Marking ChangeSet: "migrations/001_update_migrations.yaml::v48.00-010::qnkhuat" as ran despite precondition failure due to onFail='MARK_RAN':
liquibase.yaml : DBMS Precondition failed: expected mysql,mariadb, got postgresql
INFO liquibase.changelog :: Index idx_revision_most_recent created
INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v48.00-011::qnkhuat ran successfully in 4ms
ERROR liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v48.00-013::qnkhuat encountered an exception.
liquibase.exception.DatabaseException: ERROR: syntax error at or near "NOT"
Position: 17 [Failed SQL: (0) CREATE INDEX IF NOT EXISTS idx_action_made_public_by_id ON action (made_public_by_id)]
Has anyone encountered this before? I am new to Metabase and Postgres, so I am still struggling to get a handle on this.
It’s strange that it’s failing on the “NOT” part, sounds like this is some sort of non-standard postgres? Could you share more details about how this postgres is deployed, and can you send us the result of running a `select version()` query on the the database?
Judging by the first bit where your SELECT VERSION() returns Postgres 9.2.24, and that the NOT EXISTS syntax has been introduced in Postgres 9.5 (see this stack overflow post), I’d say you’re actually running Postgres 9.2. Could it be you’re running multiple postgres and pointing to the wrong one? I would double check the version and make sure it really is version 13.
It looks like I will have to move to PG 12 to be able to upgrade to Metabase 50. Or is it just recommended to install PG 13 as we will ultimately upgrade to the newest Metabase release?
You might as well upgrade to the latest available (17) at this point. PG12 is out of support so I wouldn’t choose that, and PG13 support will end shortly, so you’ll be upgrading again soon.
From 9.2 it’s a dump & restore to upgrade, but I would absolutely run a test upgrade first in case there are issues with getting a proper dump. Remember to use pg_dump from the target version. You’ll probably need to test your app(s) as well, if there is anything other than Metabase using that PG cluster.
We’re about to upgrade our server to RHEL 8. We’ll do that first, so we don’t have to mess with the different PG repos. Then we will upgrade to PG17. Finally, we’ll upgrade Metabase.