Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI apache#6066] Fix PostgreSQL metastore migration script failur…
…e if indexes already exist # 🔍 Description ## Issue References 🔗 This pull request is a small fix for apache#5674 ## Describe Your Solution 🔧 PostgreSQL support as backend for metadata store was added in apache#6027. If we choose it and run schema init scripts several times, then the following errors will be logged: `Error executing sql: CREATE UNIQUE INDEX unique_identifier_index ON metadata(identifier), with params: . ERROR: relation "unique_identifier_index" already exists`. This PR adds lacking `IF NOT EXISTS` to db indexes creation ddls in the PostgreSQL metastore init script. ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) Closes apache#6066 from tigrulya-exe/feature/5674-postgresql-metadata-backend. Closes apache#6066 bb6487c [Tigran Manasyan] Fix PostgreSQL metastore migration script failure if indexes already exist Authored-by: Tigran Manasyan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
- Loading branch information