chatwoot / chatwoot/docs

permission denied to create extension "pg_stat_statements"

Open
#230 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
89
Forks
178
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Trying to setup a new chatwoot server, and running either db:chatwoot_prepare or db:schema:load

```
rails aborted!
ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied to create extension "pg_stat_statements"
HINT: Must be superuser to create this extension.
/home/chatwoot/chatwoot/db/schema.rb:16:in `block in '
/home/chatwoot/chatwoot/db/schema.rb:13:in `'

Caused by:
PG::InsufficientPrivilege: ERROR: permission denied to create extension "pg_stat_statements"
HINT: Must be superuser to create this extension.
```

**To Reproduce**

My PG Setup
```
CREATE USER chatwoot NOINHERIT LOGIN PASSWORD '';
CREATE DATABASE chatwoot_production OWNER chatwoot;
GRANT ALL PRIVILEGES ON DATABASE chatwoot_production to chatwoot;
```
**Expected behavior**

A clear indication on what roles to give to chatwoot in the readme. Also, expecting chatwoot to get superadmin privilegies seems a bit excessive. Is there no other way to configure what you need ?

**Screenshots**

N/A

**Browser logs**

N/A

**Server logs**

N/A

**Environment**

Self hosted chatwoot, Linux VM deployment
release/2.2.1

**Desktop (please complete the following information):**
- OS: Debian 13

**Smartphone (please complete the following information):**
N/A

**Additional context**

Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.