You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/06/02 09:23:50 UTC

[GitHub] [dolphinscheduler] chengshiwen opened a new issue #5583: [Bug][SQL] org.postgresql.util.PSQLException: ERROR: column "group_name" named in key does not exist

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:
users@infra.apache.org



[GitHub] [dolphinscheduler] ruanwenjun commented on issue #5583: [Bug][SQL] org.postgresql.util.PSQLException: ERROR: column "group_name" named in key does not exist

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on issue #5583:
URL: https://github.com/apache/dolphinscheduler/issues/5583#issuecomment-852869983


   Sorry, this is my problem, the table name is wrong.
   https://github.com/apache/dolphinscheduler/blob/cc9e5d5d34fcf2279b267cca7df37a9e80eeba07/sql/upgrade/1.4.0_schema/postgresql/dolphinscheduler_ddl.sql#L279
   t_ds_process_definition should changed to t_ds_alertgroup
   
   https://github.com/apache/dolphinscheduler/blob/cc9e5d5d34fcf2279b267cca7df37a9e80eeba07/sql/upgrade/1.4.0_schema/postgresql/dolphinscheduler_ddl.sql#L297
   
   t_ds_process_definition should changed to t_ds_datasource


-- 
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:
users@infra.apache.org



[GitHub] [dolphinscheduler] leeseven-li commented on issue #5583: [Bug][SQL] org.postgresql.util.PSQLException: ERROR: column "group_name" named in key does not exist

Posted by GitBox <gi...@apache.org>.
leeseven-li commented on issue #5583:
URL: https://github.com/apache/dolphinscheduler/issues/5583#issuecomment-857304746


   @chengshiwen 
   


-- 
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:
users@infra.apache.org



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #5583: [Bug][SQL] org.postgresql.util.PSQLException: ERROR: column "group_name" named in key does not exist

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5583:
URL: https://github.com/apache/dolphinscheduler/issues/5583#issuecomment-852862815


   Hi:
   * Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.


-- 
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:
users@infra.apache.org



[GitHub] [dolphinscheduler] CalvinKirs closed issue #5583: [Bug][SQL] org.postgresql.util.PSQLException: ERROR: column "group_name" named in key does not exist

Posted by GitBox <gi...@apache.org>.
CalvinKirs closed issue #5583:
URL: https://github.com/apache/dolphinscheduler/issues/5583


   


-- 
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:
users@infra.apache.org



[GitHub] [dolphinscheduler] leeseven-li commented on issue #5583: [Bug][SQL] org.postgresql.util.PSQLException: ERROR: column "group_name" named in key does not exist

Posted by GitBox <gi...@apache.org>.
leeseven-li commented on issue #5583:
URL: https://github.com/apache/dolphinscheduler/issues/5583#issuecomment-857304648


   I submitted pr, I don’t know if the steps are right or not, what needs to be done, the first time I submit
   


-- 
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:
users@infra.apache.org