Postgres config

Unimus support forum
Post Reply
marcsivak
Posts: 3
Joined: Thu Mar 05, 2020 4:10 pm

Thu Mar 05, 2020 4:13 pm

Trying to initialize system against a postgres DB and keep receiving the message :

Could not upgrade the database.
Please drop and recreate the database and try again, or contact support.
marcsivak
Posts: 3
Joined: Thu Mar 05, 2020 4:10 pm

Thu Mar 05, 2020 4:19 pm

DB setup:

CREATE DATABASE unimus
WITH
OWNER = unimusadmin
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Thu Mar 05, 2020 5:24 pm

Hi,

Could you please check the log file - it should offer more details on why DB creation fails.
("/var/log/unimus/unimus.log" or "C:\ProgramData\Unimus\log\unimus.log")
marcsivak
Posts: 3
Joined: Thu Mar 05, 2020 4:10 pm

Thu Mar 05, 2020 6:18 pm

2020-03-05 12:15:51.335 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.w.step.ValidatingLicenseKey : Validating license key
2020-03-05 12:15:52.098 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.business.file.FileSystemProperties : Saving license key to file 'unimus.properties'
2020-03-05 12:15:52.099 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.w.step.DatabaseConnectionCheck : Testing database connection
2020-03-05 12:15:52.108 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.w.step.DatabaseConnectionCheck : Database connection test passed
2020-03-05 12:15:52.109 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.wizard.step.DatabaseUpdate : Connecting and creating / updating database tables (POSTGRESQL)
2020-03-05 12:15:52.583 ERROR 1260 --- [SimpleAsyncTaskExecutor-34] liquibase : classpath:/db/changelog/postgresql/db.changelog-master-postgresql.xml: classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated): Change Set classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated) failed. Error: ERROR: syntax error at or near "OIDS"
Position: 209 [Failed SQL: CREATE TABLE public.backup (id BIGSERIAL NOT NULL, create_time BIGINT NOT NULL, device_backup OID NOT NULL, type VARCHAR(255) NOT NULL, device_id BIGINT NOT NULL, CONSTRAINT backup_pkey PRIMARY KEY (id))WITH OIDS]

2020-03-05 12:15:52.584 WARN 1260 --- [SimpleAsyncTaskExecutor-34] n.u.b.d.LiquibaseChangeExecListenerImpl : [runFailed] Changelog = 'classpath:/db/changelog/postgresql/db.changelog-master-postgresql.xml'. ChangeSet = '1489410393841-2'
2020-03-05 12:15:52.598 WARN 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.wizard.step.DatabaseUpdate : Failed to connect and create / update database. Reason = liquibase.exception.MigrationFailedException: Migration failed for change set classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated):
Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near "OIDS"
Position: 209 [Failed SQL: CREATE TABLE public.backup (id BIGSERIAL NOT NULL, create_time BIGINT NOT NULL, device_backup OID NOT NULL, type VARCHAR(255) NOT NULL, device_id BIGINT NOT NULL, CONSTRAINT backup_pkey PRIMARY KEY (id))WITH OIDS]
2020-03-05 12:15:52.599 WARN 1260 --- [SimpleAsyncTaskExecutor-34] n.unimus.system.bootstrap.wizard.Wizard : Wizard failed. Reason = liquibase.exception.MigrationFailedException: Migration failed for change set classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated):
Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near "OIDS"
Position: 209 [Failed SQL: CREATE TABLE public.backup (id BIGSERIAL NOT NULL, create_time BIGINT NOT NULL, device_backup OID NOT NULL, type VARCHAR(255) NOT NULL, device_id BIGINT NOT NULL, CONSTRAINT backup_pkey PRIMARY KEY (id))WITH OIDS]. Wizard{running=true, finished=false, failed=true}
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Mon Mar 09, 2020 7:09 pm

Hi,

Apologies for the delayed response - I talked with the devs today regarding the PGSQL issue.
PGSQL v12 (and newer) do not support OIDs anymore, and as such these versions of PGSQL are currently not supported by Unimus.

We have support for these PGSQL versions to our internal Roadmap.
Adding support will require some work, as we need to introduce support for 2 separate DB scripts and changelogs for a single DB engine - something Unimus is currently not ready for. I can't currently promise any ETA on v12+ support, but it's definitely on our radar.
rhcinos
Posts: 1
Joined: Wed Dec 13, 2023 1:11 pm

Wed Dec 13, 2023 1:28 pm

Hi Tomas,

We are currently trying to install Unimus to trial it. We are installing on Ubuntu 22.04 which comes with PostgreSQL 14 and getting the same error as this thread. I couldn't find any database version support list (major versions) in your documentation - please could you publish this? Also, could you confirm if this issue is still outstanding, or could we be seeing a different issue? I note that PostgeSQL 11 went end of support last month, so this is not an option for us.

Regards,
RIchard
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Thu Dec 14, 2023 10:35 pm

rhcinos wrote:
Wed Dec 13, 2023 1:28 pm
We are currently trying to install Unimus to trial it. We are installing on Ubuntu 22.04 which comes with PostgreSQL 14 and getting the same error as this thread. I couldn't find any database version support list (major versions) in your documentation - please could you publish this? Also, could you confirm if this issue is still outstanding, or could we be seeing a different issue? I note that PostgeSQL 11 went end of support last month, so this is not an option for us.
Hi. Apologies, this is still an outstanding issue. As mentioned in previous replies, we need to do some heavy refactoring around how we handle DB connections to support different DB layouts for different versions of the same DB engine. Since PGSQL 11 is EOL, and now that Unimus 2.4 is out (all our resources were focused on getting 2.4 out), we will start this rework.

I will update this thread as soon as I have any estimates from the devs. Currently, I would recommend using MariaDB until we solve this.
matt.bishop
Posts: 1
Joined: Tue Jan 16, 2024 2:43 pm

Tue Jan 16, 2024 3:49 pm

Hi Tomas!

Sorry to pile on, just wanted to express that this renewed Postgres support would be of great interest to us as well. We are currently trialing Unimus in our org, and were expecting use it with Postgres (13) if we move forward (which seems promising).


We're excited about Unimus, thank you for you and your team's hard work on this software!
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Thu Jan 18, 2024 12:30 am

We finalized our Roadmap for 2024, and we expect to have support for Postgre v12+ available in 2.6.0. The team hopes to have the release out in late July 2024.

Apologies this will take so long. Like I mentioned previously, this is not a simple feature, due to the necessity to keep compatibility with older Postgre (for existing deploys), and at the same time support a completely different DB layout (DDL) for newer Postgre versions.

More info also on our Roadmap: https://wiki.unimus.net/display/UNPUB/Roadmap
Post Reply