[ https://issues.apache.org/jira/browse/HIVE-18220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Shelukhin updated HIVE-18220: ------------------------------------ Resolution: Fixed Fix Version/s: 3.0.0 Status: Resolved (was: Patch Available) Committed to master. Thanks for the patch! > Workload Management tables have broken constraints defined on postgres schema > ----------------------------------------------------------------------------- > > Key: HIVE-18220 > URL: https://issues.apache.org/jira/browse/HIVE-18220 > Project: Hive > Issue Type: Bug > Components: Metastore > Reporter: Deepesh Khandelwal > Assignee: Deepesh Khandelwal > Priority: Blocker > Fix For: 3.0.0 > > Attachments: HIVE-18220.patch > > > Schema initialization on Postgres fails with the following error: > {noformat} > 0: jdbc:postgresql://localhost.localdomain:54> ALTER TABLE ONLY "WM_POOL" ADD > CO > NSTRAINT "UNIQUE_WM_RESOURCEPLAN" UNIQUE ("NAME") > Error: ERROR: column "NAME" named in key does not exist (state=42703,code=0) > Closing: 0: jdbc:postgresql://localhost.localdomain:5432/hive > org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization > FAILED! Metastore state would be inconsistent !! > Underlying cause: java.io.IOException : Schema script failed, errorcode 2 > org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization > FAILED! Metastore state would be inconsistent !! > at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:586) > at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:559) > at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1183) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.apache.hadoop.util.RunJar.run(RunJar.java:239) > at org.apache.hadoop.util.RunJar.main(RunJar.java:153) > Caused by: java.io.IOException: Schema script failed, errorcode 2 > at > org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:957) > at > org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:935) > at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:582) > ... 8 more > {noformat} > It is due to couple on incorrect constraint definitions in the schema. -- This message was sent by Atlassian JIRA (v6.4.14#64029)