metabase / metabase/metabase

Document that Metabase needs super user on the installation on Azure (CREATE EXTENSION Error)

Open
#53,627 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Operation/Database Migrations Priority:P2 Type:Documentation
Dominant language
Clojure
Stars
49.3k
Forks
6.8k
Avg merge
1d 13h
Merged PRs (30d)
653

Description

**Is your feature request related to a problem? Please describe.**
When a new Metabase instance is launched, the migration script automatically attempts to run commands like the following:
```
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public
CREATE EXTENSION IF NOT EXISTS uuid-ossp WITH SCHEMA public
```

However, in Azure Database for PostgreSQL, admin privileges are required to execute CREATE EXTENSION. This means that even if the extensions are already installed, the migration still attempts to run these commands, resulting in a permissions error.

**Describe the solution you'd like**
The request is for Metabase to first check whether an extension exists before attempting to create it. This would eliminate the need for workarounds in automated deployments.

**Describe alternatives you've considered**
Currently, the workaround involves “tricking” the migration by restoring a backup of the databasechangelog table from another instance to bypass the extension creation step.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the migration script that runs CREATE EXTENSION for citext and uuid-ossp, then review how the databasechangelog table records that migration. Verify the behavior against Azure Database for PostgreSQL when the extensions already exist, and confirm that a new Metabase instance completes migration without a permissions error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, clojure, postgresql
Domain
cloud, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.