chengshiwen opened a new issue #5583:
URL: https://github.com/apache/dolphinscheduler/issues/5583
**To Reproduce**
Steps to reproduce the behavior, for example:
1. Run DolphinScheduler with PostgreSQL
2. Click on the class 'CreateDolphinScheduler'
3. See error
**Expected behavior**
Bug fixed
**Screenshots**
```
16:55:01.862 [main] INFO
org.apache.dolphinscheduler.common.utils.ScriptRunner - sql: DROP FUNCTION IF
EXISTS uc_dolphin_T_t_ds_alertgroup_A_create_user_id()
16:55:01.869 [main] INFO
org.apache.dolphinscheduler.common.utils.ScriptRunner - --
uc_dolphin_T_t_ds_alertgroup_A_add_UN_groupName
16:55:01.869 [main] INFO
org.apache.dolphinscheduler.common.utils.ScriptRunner - sql: CREATE OR REPLACE
FUNCTION uc_dolphin_T_t_ds_alertgroup_A_add_UN_groupName() RETURNS void AS $$
BEGIN IF NOT EXISTS (SELECT 1 FROM pg_stat_all_indexes WHERE
relname='t_ds_alertgroup' AND indexrelname
='t_ds_alertgroup_name_UN') THEN ALTER TABLE
t_ds_process_definition ADD CONSTRAINT t_ds_alertgroup_name_UN UNIQUE
(group_name); END IF; END; $$ LANGUAGE plpgsql;
16:55:01.882 [main] INFO
org.apache.dolphinscheduler.common.utils.ScriptRunner - sql: SELECT
uc_dolphin_T_t_ds_alertgroup_A_add_UN_groupName()
16:55:01.904 [main] ERROR
org.apache.dolphinscheduler.common.utils.ScriptRunner - SQLException
org.postgresql.util.PSQLException: ERROR: column "group_name" named in key
does not exist
在位置:SQL statement "ALTER TABLE t_ds_process_definition ADD CONSTRAINT
t_ds_alertgroup_name_UN UNIQUE (group_name)"
PL/pgSQL function uc_dolphin_t_t_ds_alertgroup_a_add_un_groupname() line 1
at SQL statement
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at
com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:633)
at
org.apache.dolphinscheduler.common.utils.ScriptRunner.runScript(ScriptRunner.java:145)
at
org.apache.dolphinscheduler.common.utils.ScriptRunner.runScript(ScriptRunner.java:75)
at
org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.upgradeDolphinSchedulerDDL(UpgradeDao.java:489)
at
org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.upgradeDolphinScheduler(UpgradeDao.java:267)
at
org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.upgradeDolphinScheduler(DolphinSchedulerManager.java:117)
at
org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:40)
16:55:01.904 [main] ERROR
org.apache.dolphinscheduler.common.utils.ScriptRunner - Error executing: SELECT
uc_dolphin_T_t_ds_alertgroup_A_add_UN_groupName()
16:55:01.904 [main] ERROR org.apache.dolphinscheduler.dao.upgrade.UpgradeDao
- ERROR: column "group_name" named in key does not exist
在位置:SQL statement "ALTER TABLE t_ds_process_definition ADD CONSTRAINT
t_ds_alertgroup_name_UN UNIQUE (group_name)"
PL/pgSQL function uc_dolphin_t_t_ds_alertgroup_a_add_un_groupname() line 1
at SQL statement
org.postgresql.util.PSQLException: ERROR: column "group_name" named in key
does not exist
在位置:SQL statement "ALTER TABLE t_ds_process_definition ADD CONSTRAINT
t_ds_alertgroup_name_UN UNIQUE (group_name)"
PL/pgSQL function uc_dolphin_t_t_ds_alertgroup_a_add_un_groupname() line 1
at SQL statement
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at
com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:633)
at
org.apache.dolphinscheduler.common.utils.ScriptRunner.runScript(ScriptRunner.java:145)
at
org.apache.dolphinscheduler.common.utils.ScriptRunner.runScript(ScriptRunner.java:75)
at
org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.upgradeDolphinSchedulerDDL(UpgradeDao.java:489)
at
org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.upgradeDolphinScheduler(UpgradeDao.java:267)
at
org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.upgradeDolphinScheduler(DolphinSchedulerManager.java:117)
at
org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:40)
16:55:01.909 [main] ERROR
org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler - create
DolphinScheduler failed
java.lang.RuntimeException: ERROR: column "group_name" named in key does not
exist
在位置:SQL statement "ALTER TABLE t_ds_process_definition ADD CONSTRAINT
t_ds_alertgroup_name_UN UNIQUE (group_name)"
PL/pgSQL function uc_dolphin_t_t_ds_alertgroup_a_add_un_groupname() line 1
at SQL statement
at
org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.upgradeDolphinSchedulerDDL(UpgradeDao.java:502)
at
org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.upgradeDolphinScheduler(UpgradeDao.java:267)
at
org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.upgradeDolphinScheduler(DolphinSchedulerManager.java:117)
at
org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:40)
Caused by: org.postgresql.util.PSQLException: ERROR: column "group_name"
named in key does not exist
在位置:SQL statement "ALTER TABLE t_ds_process_definition ADD CONSTRAINT
t_ds_alertgroup_name_UN UNIQUE (group_name)"
PL/pgSQL function uc_dolphin_t_t_ds_alertgroup_a_add_un_groupname() line 1
at SQL statement
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at
com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:633)
at
org.apache.dolphinscheduler.common.utils.ScriptRunner.runScript(ScriptRunner.java:145)
at
org.apache.dolphinscheduler.common.utils.ScriptRunner.runScript(ScriptRunner.java:75)
at
org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.upgradeDolphinSchedulerDDL(UpgradeDao.java:489)
... 3 common frames omitted
```
**Which version of Dolphin Scheduler:**
-[dev]
@ruanwenjun
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]